Skip to content

Remove ICU4J (com.ibm.icu) dependency, replace with java.text#163

Merged
jasonk000 merged 1 commit intomasterfrom
jkoch/remove-icu
Mar 5, 2026
Merged

Remove ICU4J (com.ibm.icu) dependency, replace with java.text#163
jasonk000 merged 1 commit intomasterfrom
jkoch/remove-icu

Conversation

@jasonk000
Copy link
Contributor

While investigating #145, I learned that Eclipse has already deprecated usage of icu4j, even though there's no active campaign to migrate. But we can do the work ourselves!


All com.ibm.icu.text.* usages replaced with java.text.* equivalents.

Mostly a simple swap, with two specifics:

  • DecimalFormatSymbols.getPlusSign() does not exist in java.text so we have a hardcoded '+' symbol.
  • NumberFormat.parse() loses precision for values beyond 'long' range, so in cases where we expect we might go over, we use setParseBigDecimal(). Majority of cases it's not required since that would be a 8PB heap, and we are hopefully a few years away from that.

This removes com.ibm.icu.text from MANFIEST.MF and the com.ibm.icu plugin feature and some docs/comments.

All com.ibm.icu.text.* usages replaced with java.text.* equivalents.

Mostly a simple swap, with two specifics:
- DecimalFormatSymbols.getPlusSign() does not exist in java.text so we
  have a hardcoded '+' symbol.
- NumberFormat.parse() loses precision for values beyond 'long' range,
  so in cases where we expect we might go over, we use
  setParseBigDecimal(). Majority of cases it's not required since that
  would be a 8PB heap, and we are hopefully a few years away from that.

This removes com.ibm.icu.text from MANFIEST.MF and the com.ibm.icu
plugin feature and some docs/comments.
@jasonk000 jasonk000 requested a review from kgibm March 2, 2026 00:54
Copy link
Member

@kgibm kgibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but this stuff is before my time, so I think it would be good for @krumts to review if he has time

Copy link
Contributor

@krumts krumts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think the differences are acceptable, and we get rid the dependency by this.

@jasonk000 jasonk000 merged commit 76560bc into master Mar 5, 2026
1 check passed
@jasonk000 jasonk000 deleted the jkoch/remove-icu branch March 5, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants