The specification for `java.awt.image.ColorModel#getComponentSize(int)` states 
that an ArrayIndexOutOfBoundsException is thrown "if componentIdx is greater 
than the number of components or less than zero". The condition should actually 
be "if componentIdx is greater than OR EQUAL TO the number of components or 
less than zero."

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

Commit messages:
 - 4677581: ColorModel.getComponentSize()-wrong conditions for 
ArrayIndexOutOfBoundsExceptio

Changes: https://git.openjdk.org/jdk/pull/11470/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11470&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-4677581
  Stats: 57 lines in 2 files changed: 54 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/11470.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11470/head:pull/11470

PR: https://git.openjdk.org/jdk/pull/11470

Reply via email to