Ticket #18 (new defect)

Opened 4 years ago

UnicodeJSPs: sun.text.normalizer?

Reported by: srl Owned by: mark
Component: webutils


was CldrBug:6792

did the following to get java 7 to compile. docs say UTF16.valueof was just a convenience for String.valueof.

Index: src/org/unicode/jsp/XPropertyFactory.java
--- src/org/unicode/jsp/XPropertyFactory.java	(revisión: 564)
+++ src/org/unicode/jsp/XPropertyFactory.java	(copia de trabajo)
@@ -13,8 +13,6 @@
 import org.unicode.jsp.UnicodeProperty.BaseProperty;
 import org.unicode.jsp.UnicodeProperty.SimpleProperty;
-import sun.text.normalizer.UTF16;
 import com.ibm.icu.dev.util.UnicodeMap;
 import com.ibm.icu.lang.UCharacter;
 import com.ibm.icu.lang.UProperty.NameChoice;
@@ -474,7 +472,7 @@
         protected String _getValue(int codepoint) {
-            return transform.transform(UTF16.valueOf(codepoint));
+            return transform.transform(String.valueOf(codepoint));

Mark replied: Changed to use the ICU import (not sun). String.valueOf(1234) doesn't do the same as UTF16.valueOf(1234). The first produces "1234", the second "\u1234".

Note: See TracTickets for help on using tickets.