diff options
author | Henrik Nord <[email protected]> | 2012-02-16 12:20:44 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-02-16 12:20:49 +0100 |
commit | 377672dbef977595bdfa8182f1eacac043753e74 (patch) | |
tree | e89690222b6bc2e8cf16687ce0f12b5ace9be2d0 /lib/jinterface/test | |
parent | 86ceb50d68ab3225b1152358f14125f01d705694 (diff) | |
parent | e01d6f39b940d917ae445d8428b154de87888000 (diff) | |
download | otp-377672dbef977595bdfa8182f1eacac043753e74.tar.gz otp-377672dbef977595bdfa8182f1eacac043753e74.tar.bz2 otp-377672dbef977595bdfa8182f1eacac043753e74.zip |
Merge branch 'vd/java-string-bug' into maint
* vd/java-string-bug:
add test for Java string bug
workaround for Java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6242664
OTP-9927
Diffstat (limited to 'lib/jinterface/test')
-rw-r--r-- | lib/jinterface/test/nc_SUITE.erl | 7 | ||||
-rw-r--r-- | lib/jinterface/test/nc_SUITE_data/echo_server.java | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/jinterface/test/nc_SUITE.erl b/lib/jinterface/test/nc_SUITE.erl index da54f5bf51..9c88400c2a 100644 --- a/lib/jinterface/test/nc_SUITE.erl +++ b/lib/jinterface/test/nc_SUITE.erl @@ -296,7 +296,8 @@ lists_roundtrip_2(Config) when is_list(Config) -> {[z,23|24],tail3}, {[z|25],tail3}, {"abc123",sub3atom}, - {"abc",sub3atom} + {"abc",sub3atom}, + {"abcdefg",codepointBug} ], Trans = fun ([_|T], tail) -> @@ -308,7 +309,9 @@ lists_roundtrip_2(Config) when is_list(Config) -> (L, tail3) when is_list(L) -> null; ([_,_,_|L], sub3atom) -> - list_to_atom(L) + list_to_atom(L); + (L, codepointBug) -> + L end, OutTrans = fun ({L,Twist}) -> diff --git a/lib/jinterface/test/nc_SUITE_data/echo_server.java b/lib/jinterface/test/nc_SUITE_data/echo_server.java index 0550e4beb1..5ecb5b72a7 100644 --- a/lib/jinterface/test/nc_SUITE_data/echo_server.java +++ b/lib/jinterface/test/nc_SUITE_data/echo_server.java @@ -202,6 +202,12 @@ public class echo_server { final OtpErlangAtom o = new OtpErlangAtom(s.stringValue() .substring(3)); return o; + } else if (atomValue.equals("codepointBug") + && i instanceof OtpErlangString) { + final OtpErlangString s = (OtpErlangString) i; + final String ss = s.stringValue().substring(3, 6); + final int[] cps = OtpErlangString.stringToCodePoints(ss); + return s; } else if (atomValue.equals("utf8")) { if (i instanceof OtpErlangString) { final OtpErlangString s = (OtpErlangString) i; |