--- old/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java 2014-02-14 18:49:43.674212083 -0800 +++ new/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java 2014-02-14 18:49:43.520878746 -0800 @@ -43,9 +43,9 @@ */ public abstract class ImageInputStreamImpl implements ImageInputStream { - private Stack markByteStack = new Stack(); + private Stack markByteStack = new Stack<>(); - private Stack markBitStack = new Stack(); + private Stack markBitStack = new Stack<>(); private boolean isClosed = false; @@ -798,14 +798,14 @@ return; } - long pos = ((Long)markByteStack.pop()).longValue(); + long pos = markByteStack.pop().longValue(); if (pos < flushedPos) { throw new IIOException ("Previous marked position has been discarded!"); } seek(pos); - int offset = ((Integer)markBitStack.pop()).intValue(); + int offset = markBitStack.pop().intValue(); setBitOffset(offset); }