< prev index next >

src/share/classes/javax/swing/undo/StateEdit.java

Print this page
rev 1527 : 6727662: Code improvement and warnings removing from swing packages
Summary: Removed unnecessary castings and other warnings
Reviewed-by: malenkov

*** 114,124 **** init (anObject,name); } protected void init (StateEditable anObject, String name) { this.object = anObject; ! this.preState = new Hashtable(11); this.object.storeState(this.preState); this.postState = null; this.undoRedoName = name; } --- 114,124 ---- init (anObject,name); } protected void init (StateEditable anObject, String name) { this.object = anObject; ! this.preState = new Hashtable<Object, Object>(11); this.object.storeState(this.preState); this.postState = null; this.undoRedoName = name; }
*** 131,141 **** /** * Gets the post-edit state of the StateEditable object and * ends the edit. */ public void end() { ! this.postState = new Hashtable(11); this.object.storeState(this.postState); this.removeRedundantState(); } /** --- 131,141 ---- /** * Gets the post-edit state of the StateEditable object and * ends the edit. */ public void end() { ! this.postState = new Hashtable<Object, Object>(11); this.object.storeState(this.postState); this.removeRedundantState(); } /**
*** 168,178 **** /** * Remove redundant key/values in state hashtables. */ protected void removeRedundantState() { ! Vector uselessKeys = new Vector(); Enumeration myKeys = preState.keys(); // Locate redundant state while (myKeys.hasMoreElements()) { Object myKey = myKeys.nextElement(); --- 168,178 ---- /** * Remove redundant key/values in state hashtables. */ protected void removeRedundantState() { ! Vector<Object> uselessKeys = new Vector<Object>(); Enumeration myKeys = preState.keys(); // Locate redundant state while (myKeys.hasMoreElements()) { Object myKey = myKeys.nextElement();
< prev index next >