Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
A field X of type string might generate:
public CharSequence x; // for back compatibility public void setX(String s) { if (x instanceof Utf8) x.set(s); else x = new Utf8(s); } public String getX() { return x.toString(); }
The accessor methods have not yet been released, so this would be a compatible change in 1.6. Applications that wished to use Utf8 directly for performance could still use the field directly. Utf8 could be improved to lazily convert between byte[] and String representations.