--- a/jdk/src/share/classes/javax/swing/text/StringContent.java Thu Jun 05 13:59:01 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StringContent.java Wed Jun 11 13:25:15 2014 -0700
@@ -271,11 +271,11 @@
* @param length the length >= 0
* @return the set of instances
*/
- protected Vector getPositionsInRange(Vector v, int offset,
+ protected Vector<UndoPosRef> getPositionsInRange(Vector<UndoPosRef> v, int offset,
int length) {
int n = marks.size();
int end = offset + length;
- Vector placeIn = (v == null) ? new Vector() : v;
+ Vector<UndoPosRef> 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<UndoPosRef> 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<UndoPosRef> 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<UndoPosRef> posRefs;
}
}