mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 12:05:29 -04:00
Minor optimization.
This commit is contained in:
parent
5fb091b992
commit
34efe84e5a
@ -179,8 +179,10 @@ public abstract class ImageReaderBase extends ImageReader {
|
|||||||
if (index < getMinIndex()) {
|
if (index < getMinIndex()) {
|
||||||
throw new IndexOutOfBoundsException("index < minIndex");
|
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 + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user