@@ -77,15 +77,15 @@ def getListedLicense(licenseId):
7777 dirpath = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
7878 classpath = os .path .join (dirpath , "tool.jar" )
7979 jpype .startJVM (jpype .getDefaultJVMPath (), "-ea" , "-Djava.class.path=%s" % classpath )
80-
80+ jpype . JPackage ( "org.spdx.library" ). SpdxModelFactory . init ()
8181 # Attach a Thread and start processing the request
8282 jpype .attachThreadToJVM ()
83- package = jpype .JPackage ("org.spdx.library.model.license " )
83+ package = jpype .JPackage ("org.spdx.library" )
8484 licenseinfofactoryclass = package .LicenseInfoFactory
8585 try :
8686
8787 # Call the method getListedLicenseById present in the SPDX Tools
88- listed_license = licenseinfofactoryclass .getListedLicenseById (licenseId )
88+ listed_license = licenseinfofactoryclass .getListedLicenseByIdCompatV2 (licenseId )
8989 jpype .detachThreadFromJVM ()
9090 return listed_license
9191 except :
@@ -110,6 +110,7 @@ def checkTextStandardLicense(license, compareText):
110110 dirpath = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
111111 classpath = os .path .join (dirpath , "tool.jar" )
112112 jpype .startJVM (jpype .getDefaultJVMPath (), "-ea" , "-Djava.class.path=%s" % classpath )
113+ jpype .JPackage ("org.spdx.library" ).SpdxModelFactory .init ()
113114
114115 # Attach a Thread and start processing the request
115116 jpype .attachThreadToJVM ()
0 commit comments