changeset 36889:e36687a00487

6379088: Suboptimal expression in javax.imageio.ImageTypeSpecifier.getBitsPerBand(int) Reviewed-by: prr, serb, jdv
author psadhukhan
date Thu, 17 Mar 2016 11:23:31 +0530
parents 0905e6c2d1af
children b1b7c1f2ad89
files jdk/src/java.desktop/share/classes/javax/imageio/ImageTypeSpecifier.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);