--- old/src/java.desktop/share/classes/javax/swing/text/GapContent.java 2015-01-09 14:48:54.394781325 -0800 +++ new/src/java.desktop/share/classes/javax/swing/text/GapContent.java 2015-01-09 14:48:54.122781325 -0800 @@ -710,8 +710,9 @@ * @param length the length >= 0 * @return the set of instances */ - protected Vector getPositionsInRange(Vector v, - int offset, int length) { + @SuppressWarnings({"rawtypes", "unchecked"}) // UndoPosRef type cannot be exposed + protected Vector getPositionsInRange(Vector v, + int offset, int length) { int endOffset = offset + length; int startIndex; int endIndex; @@ -758,7 +759,8 @@ * * @param positions the UndoPosRef instances to reset */ - protected void updateUndoPositions(Vector positions, int offset, + @SuppressWarnings("rawtypes") // UndoPosRef type cannot be exposed + protected void updateUndoPositions(Vector positions, int offset, int length) { // Find the indexs of the end points. int endOffset = offset + length; @@ -775,7 +777,7 @@ // Reset the location of the refenences. for(int counter = positions.size() - 1; counter >= 0; counter--) { - UndoPosRef ref = positions.elementAt(counter); + UndoPosRef ref = (UndoPosRef)positions.elementAt(counter); ref.resetLocation(endOffset, g1); } // We have to resort the marks in the range startIndex to endIndex. @@ -902,7 +904,8 @@ protected String string; /** An array of instances of UndoPosRef for the Positions in the * range that was removed, valid after undo. */ - protected Vector posRefs; + @SuppressWarnings("rawtypes") // UndoPosRef type cannot be exposed + protected Vector posRefs; } // GapContent.InsertUndo @@ -911,6 +914,7 @@ */ @SuppressWarnings("serial") // JDK-implementation class class RemoveUndo extends AbstractUndoableEdit { + @SuppressWarnings("unchecked") protected RemoveUndo(int offset, String string) { super(); this.offset = offset; @@ -934,6 +938,7 @@ } } + @SuppressWarnings("unchecked") public void redo() throws CannotRedoException { super.redo(); try {