--- old/src/share/classes/javax/swing/text/StringContent.java 2014-06-10 11:51:34.000000000 -0700 +++ new/src/share/classes/javax/swing/text/StringContent.java 2014-06-10 11:51:34.000000000 -0700 @@ -271,11 +271,11 @@ * @param length the length >= 0 * @return the set of instances */ - protected Vector getPositionsInRange(Vector v, int offset, + protected Vector getPositionsInRange(Vector v, int offset, int length) { int n = marks.size(); int end = offset + length; - Vector placeIn = (v == null) ? new Vector() : v; + Vector placeIn = (v == null) ? new Vector<>() : v; for (int i = 0; i < n; i++) { PosRec mark = marks.elementAt(i); if (mark.unused) { @@ -298,9 +298,9 @@ * * @param positions the positions of the instances */ - protected void updateUndoPositions(Vector positions) { + protected void updateUndoPositions(Vector positions) { for(int counter = positions.size() - 1; counter >= 0; counter--) { - UndoPosRef ref = (UndoPosRef)positions.elementAt(counter); + UndoPosRef ref = positions.elementAt(counter); // Check if the Position is still valid. if(ref.rec.unused) { positions.removeElementAt(counter); @@ -437,7 +437,7 @@ protected String string; // An array of instances of UndoPosRef for the Positions in the // range that was removed, valid after undo. - protected Vector posRefs; + protected Vector posRefs; } @@ -494,6 +494,6 @@ protected String string; // An array of instances of UndoPosRef for the Positions in the // range that was removed, valid before undo. - protected Vector posRefs; + protected Vector posRefs; } }