File tree Expand file tree Collapse file tree
com.oracle.graal.python/src/com/oracle/graal/python/resources Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959{
6060 "name" :" java.lang.System" ,
6161 "methods" :[{"name" :" getProperty" ,"parameterTypes" :[" java.lang.String" ]}]
62- },
63- {
64- "name" :" java.lang.Package" ,
65- "methods" :[
66- {"name" :" getPackages" ,"parameterTypes" :[]},
67- {"name" :" getName" ,"parameterTypes" :[]}
68- ]
6962}
7063]
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ def is_java_package(name):
4848 package = type ("java.lang.Package" )
4949 return any (p .getName ().startswith (name ) for p in package .getPackages ())
5050 except KeyError :
51+ if name in ("java.lang" , "java.util" ):
52+ # Some well-known packages that we always allow
53+ return True
5154 if sys .flags .verbose :
5255 from _warnings import warn
5356 warn ("Host lookup allowed, but java.lang.Package not available. Importing from Java cannot work." )
You can’t perform that action at this time.
0 commit comments