summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/awt/image/ComponentSampleModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/awt/image/ComponentSampleModel.java')
-rw-r--r--libjava/classpath/java/awt/image/ComponentSampleModel.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/libjava/classpath/java/awt/image/ComponentSampleModel.java b/libjava/classpath/java/awt/image/ComponentSampleModel.java
index 953f63c1ea1..5cf06e4a17f 100644
--- a/libjava/classpath/java/awt/image/ComponentSampleModel.java
+++ b/libjava/classpath/java/awt/image/ComponentSampleModel.java
@@ -63,8 +63,11 @@ public class ComponentSampleModel extends SampleModel
protected int[] bandOffsets;
protected int[] bankIndices;
- // FIXME: Should we really shadow the numBands in the superclass?
- //protected int numBands;
+ /**
+ * Number of bands in the image described.
+ * @specnote This field shadows the protected numBands in SampleModel.
+ */
+ protected int numBands;
/** Used when creating data buffers. */
protected int numBanks;
@@ -100,6 +103,7 @@ public class ComponentSampleModel extends SampleModel
this.bandOffsets = bandOffsets;
this.bankIndices = bankIndices;
+ this.numBands = bandOffsets.length;
this.numBanks = 0;
for (int b=0; b<bankIndices.length; b++)