mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-04 11:26:44 -04:00
Minor optimization.
This commit is contained in:
@@ -179,8 +179,10 @@ public abstract class ImageReaderBase extends ImageReader {
|
||||
if (index < getMinIndex()) {
|
||||
throw new IndexOutOfBoundsException("index < minIndex");
|
||||
}
|
||||
else if (getNumImages(false) != -1 && index >= getNumImages(false)) {
|
||||
throw new IndexOutOfBoundsException("index >= numImages (" + index + " >= " + getNumImages(false) + ")");
|
||||
|
||||
int numImages = getNumImages(false);
|
||||
if (numImages != -1 && index >= numImages) {
|
||||
throw new IndexOutOfBoundsException("index >= numImages (" + index + " >= " + numImages + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user