new java.... #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
in java 11 sometimes (if class loader = bootstrap) method Class.getClassLoader returns NULL!
So library LuajavaLib should be patched to new behaviour (line number is 146):
Object proxy = Proxy.newProxyInstance(getClass().getClassLoader(), ifaces, handler);Also Returns Null object...Try tricks above:
System.out.print(LuaValue.class.getClassLoader());System.out.print(Runnable.class.getClassLoader());Second call returns null.
Please fix it... thx
Read here: https://stackoverflow.com/questions/1921238/getclass-getclassloader-is-null-why
We can use
ClassLoader.getSystemClassLoader()if previous call return null, but this not guaranteed you get not null value here. All depends on how you load classes. Usually LuaValue is custom class and do not loaded via bootstrap loader.If you get null, then LuaValue loaded by bootstrap. You need check value of
ClassLoader.getSystemClassLoader()for this case and report here about results.Sorry, this issue not associated with class loading...
I got null when tried to
print(luajava.createProxy(...)), so i think problem inProxyclass... But not.Now i believe is in
toStringimplementation of created proxy-object (this method returns null string, because is absent)..Need add some checks, if method present in
Object.classand absent in passedLuaValue( second arg tocreateProxy) - call to super-methodBecause
equals?hashCodeis to not working..android not found class,