From f0b8ce3856c87730e1eccdd1091205ff85423ca1 Mon Sep 17 00:00:00 2001 From: Tony Finn Date: Sat, 3 Jan 2015 18:56:50 +0000 Subject: [PATCH] Fix JVM signatures for the java.lang.Class method. The methods defined in the Class class contain semicolons at the end of the signatures for methods which return primitives, while these are only required after class names. As a result, a JVM error occurs when attempting to call any of the affected methods. --- jnius/reflect.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jnius/reflect.py b/jnius/reflect.py index b3b1ea7..8e260df 100644 --- a/jnius/reflect.py +++ b/jnius/reflect.py @@ -10,7 +10,7 @@ class Class(JavaClass): __metaclass__ = MetaJavaClass __javaclass__ = 'java/lang/Class' - desiredAssertionStatus = JavaMethod('()Z;') + desiredAssertionStatus = JavaMethod('()Z') forName = JavaMultipleMethod([ ('(Ljava/lang/String,Z,Ljava/lang/ClassLoader;)Ljava/langClass;', True, False), ('(Ljava/lang/String;)Ljava/lang/Class;', True, False), ]) @@ -32,7 +32,7 @@ class Class(JavaClass): getInterfaces = JavaMethod('()[Ljava/lang/Class;') getMethod = JavaMethod('(Ljava/lang/String,[Ljava/lang/Class;)Ljava/lang/reflect/Method;') getMethods = JavaMethod('()[Ljava/lang/reflect/Method;') - getModifiers = JavaMethod('()[I;') + getModifiers = JavaMethod('()[I') getName = JavaMethod('()Ljava/lang/String;') getPackage = JavaMethod('()Ljava/lang/Package;') getProtectionDomain = JavaMethod('()Ljava/security/ProtectionDomain;') @@ -40,11 +40,11 @@ class Class(JavaClass): getResourceAsStream = JavaMethod('(Ljava/lang/String;)Ljava/io/InputStream;') getSigners = JavaMethod('()[Ljava/lang/Object;') getSuperclass = JavaMethod('()Ljava/lang/reflect/Class;') - isArray = JavaMethod('()Z;') - isAssignableFrom = JavaMethod('(Ljava/lang/reflect/Class;)Z;') - isInstance = JavaMethod('(Ljava/lang/Object;)Z;') - isInterface = JavaMethod('()Z;') - isPrimitive = JavaMethod('()Z;') + isArray = JavaMethod('()Z') + isAssignableFrom = JavaMethod('(Ljava/lang/reflect/Class;)Z') + isInstance = JavaMethod('(Ljava/lang/Object;)Z') + isInterface = JavaMethod('()Z') + isPrimitive = JavaMethod('()Z') newInstance = JavaMethod('()Ljava/lang/Object;') toString = JavaMethod('()Ljava/lang/String;')