diff options
author | Henrik Nord <[email protected]> | 2012-02-16 12:47:11 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-02-16 12:47:11 +0100 |
commit | 5620b434415d7c7d7060dbeff2c71d6bb96b91da (patch) | |
tree | 28d681356120a3a5fc8c4fba7c2e9b2acfd64718 /lib/jinterface/java_src/com/ericsson | |
parent | ddfe258f12a7706f3aea4f20bf6fc46b839ab70c (diff) | |
parent | c826b7309e57e33b1209d5b6c0f15a0e26122729 (diff) | |
download | otp-5620b434415d7c7d7060dbeff2c71d6bb96b91da.tar.gz otp-5620b434415d7c7d7060dbeff2c71d6bb96b91da.tar.bz2 otp-5620b434415d7c7d7060dbeff2c71d6bb96b91da.zip |
Merge branch 'maint'
Conflicts:
lib/hipe/cerl/erl_bif_types.erl
lib/stdlib/doc/src/binary.xml
Diffstat (limited to 'lib/jinterface/java_src/com/ericsson')
3 files changed, 12 insertions, 9 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java index 4d53447164..60eef7a126 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java @@ -53,7 +53,7 @@ public class OtpErlangAtom extends OtpErlangObject implements Serializable, if (atom.length() > maxAtomLength) { throw new java.lang.IllegalArgumentException("Atom may not exceed " - + maxAtomLength + " characters"); + + maxAtomLength + " characters: " + atom); } this.atom = atom; } diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java index 8cd900aada..be8b7c5c12 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java @@ -154,13 +154,16 @@ public class OtpErlangString extends OtpErlangObject implements Serializable, * Unicode code points */ - public static int[] stringToCodePoints(final String s) { - final int m = s.codePointCount(0, s.length()); - final int [] codePoints = new int[m]; - for (int i = 0, j = 0; j < m; i = s.offsetByCodePoints(i, 1), j++) { - codePoints[j] = s.codePointAt(i); - } - return codePoints; + public static int[] stringToCodePoints(final String s) { + final int m = s.codePointCount(0, s.length()); + final int[] codePoints = new int[m]; + int j = 0; + for (int offset = 0; offset < s.length();) { + final int codepoint = s.codePointAt(offset); + codePoints[j++] = codepoint; + offset += Character.charCount(codepoint); + } + return codePoints; } /** diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java index d6f319d378..b0b64e6953 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java @@ -141,7 +141,7 @@ public class OtpMbox { * Get the registered name of this mailbox. * * @return the registered name of this mailbox, or null if the mailbox had - * no registerd name. + * no registered name. */ public String getName() { return name; |