File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line ch
8000
ange @@ -85,20 +85,20 @@ def jsource(data):
85
85
The object or class or fully qualified class name to check for source code.
86
86
:return: The URL of the java class
87
87
"""
88
- types = jimport ("org.scijava.util.Types" )
89
- sf = jimport ("org.scijava.search.SourceFinder" )
90
- jstring = jimport ("java.lang.String" )
88
+ Types = jimport ("org.scijava.util.Types" )
89
+ SourceFinder = jimport ("org.scijava.search.SourceFinder" )
90
+ String = jimport ("java.lang.String" )
91
91
try :
92
92
if not isjava (data ) and isinstance (data , str ):
93
93
try :
94
94
data = jimport (data ) # check if data can be imported
95
95
except Exception as err :
96
96
raise ValueError (f"Not a Java object { err } " )
97
97
jcls = data if jinstance (data , "java.lang.Class" ) else jclass (data )
98
- if types .location (jcls ).toString ().startsWith (jstring ("jrt" )):
98
+ if Types .location (jcls ).toString ().startsWith (String ("jrt" )):
99
99
# Handles Java RunTime (jrt) exceptions.
100
100
raise ValueError ("Java Builtin: GitHub source code not available" )
101
- url = sf .sourceLocation (jcls , None )
101
+ url = SourceFinder .sourceLocation (jcls , None )
102
102
urlstring = url .toString ()
103
103
return urlstring
104
104
except jimport ("java.lang.IllegalArgumentException" ) as err :
You can’t perform that action at this time.
0 commit comments