Skip to content

Commit bb3f955

Browse files
committed
wip fixes
1 parent 284e889 commit bb3f955

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

recipes/android/src/java.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ cdef class JavaClass(object):
3030
args, ret = definition[1:].split(')')
3131
if args:
3232
args = args.split(';')
33+
if args[-1] == '':
34+
args.pop(-1)
3335
else:
3436
args = []
3537
return ret, args
@@ -102,6 +104,8 @@ cdef class JavaClass(object):
102104
if argtype == 'Ljava/lang/String':
103105
if isinstance(py_arg, basestring):
104106
j_args[index].l = self.j_env[0].NewStringUTF(self.j_env, <char *><bytes>py_arg)
107+
elif py_arg is None:
108+
j_args[index].l = NULL
105109
else:
106110
raise Exception("Not a correct type of string, must be an instance of str or unicode")
107111
else:
@@ -153,6 +157,8 @@ cdef class JavaMethod(object):
153157
args, ret = definition[1:].split(')')
154158
if args:
155159
args = args.split(';')
160+
if args[-1] == '':
161+
args.pop(-1)
156162
else:
157163
args = []
158164
self.definition_return = ret

0 commit comments

Comments
 (0)