6379088: Suboptimal expression in javax.imageio.ImageTypeSpecifier.getBitsPerBand(int)
Reviewed-by: prr, serb, jdv
--- a/jdk/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java Wed Mar 16 15:55:27 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java Thu Mar 17 11:23:31 2016 +0530
@@ -997,7 +997,7 @@
* negative or greater than the largest band index.
*/
public int getBitsPerBand(int band) {
- if (band < 0 | band >= getNumBands()) {
+ if (band < 0 || band >= getNumBands()) {
throw new IllegalArgumentException("band out of range!");
}
return sampleModel.getSampleSize(band);