Skip to content

Commit

Permalink
Some fixes for TemurinGenSBOM and latest CDXA update
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Dec 5, 2024
1 parent 863c453 commit 3fba15e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion cyclonedx-lib/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@
<property name="testSBOMFile_xml" location="build/testSBOM.xml"/>
<delete file="${testSBOMFile}"/>
<delete file="${testSBOMFile_xml}"/>
<echo message="${classpath}"/>
<java classpath="${classpath}" classname="temurin.sbom.TemurinGenSBOM" fork="yes" failonerror="yes">
<arg value="--verbose"/>
<arg value="--createNewSBOM"/>
Expand Down
4 changes: 2 additions & 2 deletions cyclonedx-lib/src/temurin/sbom/TemurinGenCDXA.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ public static void main(final String[] args) {
System.out.println("\nPlease enter a valid command.");
System.exit(1);
}
} catch(Exception e) {
} catch (Exception e) {
// Echo input command:
for (int i = 0; i < args.length; i++) {
System.out.print(args[i] + " ");
}
System.out.println("\nException: "+e);
System.out.println("\nException: " + e);
System.exit(1);
}
}
Expand Down
7 changes: 3 additions & 4 deletions cyclonedx-lib/src/temurin/sbom/TemurinGenSBOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.cyclonedx.model.OrganizationalContact;
import org.cyclonedx.model.OrganizationalEntity;
import org.cyclonedx.model.Property;
import org.cyclonedx.model.Tool;
import org.cyclonedx.parsers.JsonParser;
import org.cyclonedx.parsers.XmlParser;
import org.cyclonedx.Version;
Expand Down Expand Up @@ -187,12 +186,12 @@ public static void main(final String[] args) {
System.out.println("\nPlease enter a valid command.");
System.exit(1);
}
} catch(Exception e) {
} catch (Exception e) {
// Echo input command:
for (int i = 0; i < args.length; i++) {
System.out.print(args[i] + " ");
}
System.out.println("\nException: "+e);
System.out.println("\nException: " + e);
System.exit(1);
}
}
Expand All @@ -208,7 +207,7 @@ static Bom createBom() {
}

// Create Metadata if it doesn't exist
static Metadata getBomMetadata(Bom bom) {
static Metadata getBomMetadata(final Bom bom) {
Metadata metadata = bom.getMetadata();
if (metadata == null) {
metadata = new Metadata();
Expand Down

0 comments on commit 3fba15e

Please sign in to comment.