Skip to content

Commit 66f89ad

Browse files
authored
Merge pull request #25 from spdx/v3update2
Update to SPDX Spec V3
2 parents 5bf9419 + ed8a1b6 commit 66f89ad

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spdx_license_matcher/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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()

tool.jar

8.79 MB
Binary file not shown.

0 commit comments

Comments
 (0)