src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: otaviojava@java.net
@@ -365,14 +365,14 @@
}
}
// Now we are at the first image if there are any, so add it
// to the list
if (hasNextImage()) {
- imagePositions.add(new Long(iis.getStreamPosition()));
+ imagePositions.add(iis.getStreamPosition());
}
} else { // Not tables only, so add original pos to the list
- imagePositions.add(new Long(savePos));
+ imagePositions.add(savePos);
// And set current image since we've read it now
currentImage = 0;
}
if (seekForwardOnly) {
Long pos = imagePositions.get(imagePositions.size()-1);
@@ -496,11 +496,11 @@
index++) {
// Is there an image?
if (!hasNextImage()) {
throw new IndexOutOfBoundsException();
}
- pos = new Long(iis.getStreamPosition());
+ pos = iis.getStreamPosition();
imagePositions.add(pos);
if (seekForwardOnly) {
iis.flushBefore(pos.longValue());
}
if (index < imageIndex) {