On Thu, 29 Jan 2026 23:36:08 GMT, Phil Race <[email protected]> wrote:

>> Update the specification of concrete SampleModel classes which over-ride 
>> getSampleSize(int band) to describe how the behave.
>> It isn't entirely pretty because 2 of them ignore the band parameter and 
>> always have ..
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8376297

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/image/GetSampleSizeTest.java line 47:

> 45:             ComponentSampleModel csm =
> 46:                 new ComponentSampleModel(DataBuffer.TYPE_BYTE,
> 47:                         width, height, 1, width, bandOffsets);

I still think the lines 46–47 should be indented by 4 more spaces: either is a 
continuation line of the line above.


Suggestion:

            ComponentSampleModel csm =
                    new ComponentSampleModel(DataBuffer.TYPE_BYTE,
                            width, height, 1, width, bandOffsets);


However, the indentation is somewhat consistent now: lines 58 and 69 are also 
indented by 4 spaces only. Yet they should be indented by 8 spaces.

test/jdk/java/awt/image/GetSampleSizeTest.java line 75:

> 73:                 throw new RuntimeException("Unexpected numBands");
> 74:         }
> 75:             try {

Suggestion:

            if (numBands != 4) {
                throw new RuntimeException("Unexpected numBands");
            }
            try {

The brace that closes the `if` block is still indented incorrectly, it should 
be in the same column as `i` and `t` of `if` above and `try` below.

-------------

PR Review: https://git.openjdk.org/jdk/pull/29457#pullrequestreview-3728155545
PR Review Comment: https://git.openjdk.org/jdk/pull/29457#discussion_r2746158825
PR Review Comment: https://git.openjdk.org/jdk/pull/29457#discussion_r2746164592

Reply via email to