eclipse-sourceediting / sourceediting

Code repository for the Eclipse Web Tools Platform's Source Editing project
Eclipse Public License 2.0
6 stars 6 forks source link

Usage of ICU classes #3

Open jensli opened 9 months ago

jensli commented 9 months ago

I get an exception like this when I try to open an XML file with the XML editor from WST:

NoClassDefFoundError: com/ibm/icu/util/StringTokenizer
at org.eclipse.wst.sse.core.utils.StringUtils.unpack(StringUtils.java:777)

It turned out I had version 1.2.800 of org.eclipse.wst.sse.core which was to old and the following fix hadn't landed:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=580788

Anyway, the reason the ICU dependency had to changed to be required in https://github.com/eclipse-sourceediting/sourceediting/commit/96cd1af81e6020de8abaa7417e46d541014ede1e is that it is no longer shipped with the platform. See this issue for details: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562582

The reason for that is that there are standard library classes that work just as well.

For example, com.ibm.icu.util.StringTokenizer can be replaced by java.util.StringTokenizer. The java.text package can be used in many other cases.

I'd like to suggest to the maintainers of this project to also migrate away from ICU! It will probably simplify things in the future.