Permalink
Browse files

Convert <<"foo">> via java.lang.String(byte[], UTF8) when calling Java

  • Loading branch information...
1 parent 7846843 commit 17d0e5b22d7b6a7dcfc01d53fef0b1d1430dcc98 @krestenkrab krestenkrab committed May 17, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/main/java/erjang/m/java/JavaObject.java
View
5 src/main/java/erjang/m/java/JavaObject.java
@@ -485,6 +485,11 @@ public Object map(EObject val) {
EAtom am;
if ((am = val.testAtom()) != null)
return am.getName();
+
+ EBinary bi;
+ if ((bi = val.testBinary()) != null) {
+ return new String(bi.toByteArray(), IO.UTF8);
+ }
throw new IllegalArgumentException();
}

0 comments on commit 17d0e5b

Please sign in to comment.