Skip to content

Commit

Permalink
Update the tools with the latest library to support CrossRef fields
Browse files Browse the repository at this point in the history
Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
  • Loading branch information
goneall committed Dec 11, 2020
1 parent eac9039 commit a2cc808
Show file tree
Hide file tree
Showing 4 changed files with 801 additions and 638 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.spdx</groupId>
<artifactId>tools-java</artifactId>
<version>0.0.4</version>
<version>0.0.5</version>
<packaging>jar</packaging>

<name>tools-java</name>
Expand Down Expand Up @@ -99,12 +99,12 @@
<dependency>
<groupId>org.spdx</groupId>
<artifactId>java-spdx-library</artifactId>
<version>0.0.4</version>
<version>0.0.6</version>
</dependency>
<dependency>
<groupId>org.spdx</groupId>
<artifactId>spdx-rdf-store</artifactId>
<version>0.0.4</version>
<version>0.0.6</version>
</dependency>
<dependency>
<groupId>org.spdx</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/spdx/tools/CompareSpdxDocs.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void main(String[] args) {
* @param args args[0] is the output Excel file name, all other args are SPDX document file names
* @throws OnlineToolException Exception caught by JPype and displayed to the user
*/
public static void onlineFunction(String[] args) throws OnlineToolException{
public static void onlineFunction(String[] args) throws OnlineToolException {
// Arguments length( 14>=args length>=3 ) will checked in the Python Code
File outputFile = new File(args[0]);
// Output File name will be checked in the Python code for no clash, but if still found
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/spdx/tools/Verify.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import org.spdx.library.InvalidSPDXAnalysisException;
import org.spdx.library.model.SpdxDocument;
Expand Down Expand Up @@ -97,6 +98,8 @@ public static void main(String[] args) {
* @throws Errors where the SPDX file can not be parsed or the filename is invalid
*/
public static List<String> verify(String filePath, SerFileType fileType) throws SpdxVerificationException {
Objects.requireNonNull(filePath);
Objects.requireNonNull(fileType);
File file = new File(filePath);
if (!file.exists()) {
throw new SpdxVerificationException("File "+filePath+" not found.");
Expand Down
Loading

0 comments on commit a2cc808

Please sign in to comment.