kud1ing / rucaja

Calling the JVM from Rust via JNI
https://docs.rs/rucaja
Apache License 2.0
31 stars 7 forks source link

`new_jstring()` should return a non-interned Java String #9

Closed kud1ing closed 7 years ago

kud1ing commented 7 years ago

NewStringUTF() produces a java.security.AccessControlContext and not a java.lang.String. An object of the same type is generated by static_method_that_returns_an_interned_string() in the example.

We probably need to write a JvmString analogous to JvmObject so that the Java string is retained using NewGlobalRef() for a longer time.