File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -85,20 +85,20 @@ def jsource(data):
8585 The object or class or fully qualified class name to check for source code.
8686 :return: The URL of the java class
8787 """
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" )
9191 try :
9292 if not isjava (data ) and isinstance (data , str ):
9393 try :
9494 data = jimport (data ) # check if data can be imported
9595 except Exception as err :
9696 raise ValueError (f"Not a Java object { err } " )
9797 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" )):
9999 # Handles Java RunTime (jrt) exceptions.
100100 raise ValueError ("Java Builtin: GitHub source code not available" )
101- url = sf .sourceLocation (jcls , None )
101+ url = SourceFinder .sourceLocation (jcls , None )
102102 urlstring = url .toString ()
103103 return urlstring
104104 except jimport ("java.lang.IllegalArgumentException" ) as err :
You can’t perform that action at this time.
0 commit comments