ICU4J unit tests fails when using dependencies with package versions greater than 255

Description

Problem:

We recently upgraded our OpenJDK dependency in ICU4J-67 from jdk8u252-b09 to jdk8u262-b10, following which we started seeing build failures due to the following tests failing:

Looking at the stack trace, we saw an UnsupportedCharsetException which happened to be a proxy for the following error:

Root cause

The issue seems to stem from the following class where there is a hard limit on the package versions being used, capped at 255:
https://github.com/unicode-org/icu/blob/master/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java#L294

https://github.com/unicode-org/icu/blob/master/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java#L316-L317

The jdk version bump from 252 to 262 appears to have triggered this bug across ICU4J-67 and all prior versions.

Removing this hard limit/normalizing package versions greater than 255 to 255 fixed the build issue for us, but not sure where/how this value is used and what would be the correct fix for this.

Assignee

Yoshito Umaoka

Reporter

Prithvi Shah

Components

Labels

None

Reviewer

None

Priority

critical

Time Needed

Hours

Fix versions

Configure