On Mon, 2005-10-03 at 11:44 -0600, Tom Tromey wrote: > >>>>> "Tom" == Thomas Fitzsimmons <[EMAIL PROTECTED]> writes: > > Tom> * java/awt/image/SampleModel.java (numBands): Make field > Tom> package-private. > > According to both japi and the javadoc, this field is 'protected'. > > Based on reading the javadoc, I think ComponentSampleModel also has a > protected field named 'numBands'. That is kind of dumb, but valid. > > What do you think of the appended? The constructor change at least > is, I think, a needed bug fix.
Looks good, please commit. Thanks, Tom > > Tom > > 2005-10-03 Tom Tromey <[EMAIL PROTECTED]> > > * java/awt/image/ComponentSampleModel.java (numBands): Updated > javadoc. > (ComponentSampleModel): Set numBands. > * java/awt/image/SampleModel.java (numBands): Now protected. > > Index: java/awt/image/ComponentSampleModel.java > =================================================================== > RCS file: > /cvsroot/classpath/classpath/java/awt/image/ComponentSampleModel.java,v > retrieving revision 1.8 > diff -u -r1.8 ComponentSampleModel.java > --- java/awt/image/ComponentSampleModel.java 1 Oct 2005 18:57:57 -0000 > 1.8 > +++ java/awt/image/ComponentSampleModel.java 3 Oct 2005 17:44:44 -0000 > @@ -63,8 +63,10 @@ > protected int[] bandOffsets; > protected int[] bankIndices; > > - /** Number of bands in the image described. */ > - // This field shadows the package-private numBands in SampleModel. > + /** > + * Number of bands in the image described. > + * @specnote This field shadows the protected numBands in SampleModel. > + */ > protected int numBands; > > /** Used when creating data buffers. */ > @@ -101,6 +103,7 @@ > > this.bandOffsets = bandOffsets; > this.bankIndices = bankIndices; > + this.numBands = bandOffsets.length; > > this.numBanks = 0; > for (int b=0; b<bankIndices.length; b++) > Index: java/awt/image/SampleModel.java > =================================================================== > RCS file: /cvsroot/classpath/classpath/java/awt/image/SampleModel.java,v > retrieving revision 1.8 > diff -u -r1.8 SampleModel.java > --- java/awt/image/SampleModel.java 1 Oct 2005 18:57:57 -0000 1.8 > +++ java/awt/image/SampleModel.java 3 Oct 2005 17:44:44 -0000 > @@ -49,7 +49,7 @@ > > /** Number of bands in the image described. Package-private here, > shadowed by ComponentSampleModel. */ > - int numBands; > + protected int numBands; > > /** > * The DataBuffer type that is used to store the data of the image _______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
