Skip to content

Commit 657a4e6

Browse files
committed
Change logging for license list I/O error
Changes the logging level from error to warn if the license list can not be accessed over the network. The logic being that the impact is not substantial since you may only be referencing a stale version of the license list rather than the most recent. The warning message was also enhanced to point to the useJARLicenseInfoOnly property. Reference related issue spdx/spdx-maven-plugin#172
1 parent f321b13 commit 657a4e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/spdx/library/ListedLicenses.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ private void initializeLicenseModelStore() {
118118
try {
119119
baseModelStore = new SpdxListedLicenseWebStore();
120120
} catch(InvalidSPDXAnalysisException ex) {
121-
logger.error("Unable to access the most current listed licenses from https://spdx.org/licenses - using locally cached licenses: "+ex.getMessage());
121+
logger.warn("Unable to access the most current listed licenses from https://spdx.org/licenses - using locally cached licenses: "+ex.getMessage()+
122+
" Note: you can set the org.spdx.useJARLicenseInfoOnly property to true to avoid this warning.");
122123
baseModelStore = null;
123124
}
124125
}

0 commit comments

Comments
 (0)