Skip to content

Commit

Permalink
placate linter
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Dec 4, 2023
1 parent dbbfdee commit 3b4d5ee
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cyclonedx-lib/src/temurin/sbom/TemurinGenSBOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void main(final String[] args) {
String url = null;
String value = null;
String version = null;

for (int i = 0; i < args.length; i++) {
if (args[i].equals("--jsonFile")) {
fileName = args[++i];
Expand Down Expand Up @@ -294,15 +294,11 @@ static Bom addComponentExternalReference(final String fileName, final String has
static Bom addFormula(final String fileName) { // Method to store Formulation
Bom bom = readJSONfile(fileName);
List<Formula> formulation = bom.getFormulation();
if ( formulation == null ) {
System.out.println("formulation in bom is null, creating one");
if (formulation == null) {
formulation = new LinkedList<Formula>();
Formula formula = new Formula();
formulation.add(formula);
bom.setFormulation(formulation);
if ( bom.getFormulation() == null ) System.out.println("Formulation is apparently still null :eyeroll:");
} else {
System.out.println("addFormula() has done nothing as there is a already a formulation object in the BoM");
}
return bom;
}
Expand All @@ -311,7 +307,7 @@ static Bom addFormulaComponent(final String fileName, final String name, final S
// START OF SECTION FROM addFormula
Bom bom = readJSONfile(fileName);
List<Formula> formulation = bom.getFormulation();
if ( formulation == null ) {
if (formulation == null) {
formulation = new LinkedList<Formula>();
Formula formula = new Formula();
formulation.add(formula);
Expand All @@ -330,7 +326,7 @@ static Bom addFormulaComponent(final String fileName, final String name, final S
comp.setType(compType);
comp.setName(name);
List<Component> components = formula.getComponents();
if ( components == null ) {
if (components == null) {
components = new LinkedList<Component>();
}
components.add(comp);
Expand Down

0 comments on commit 3b4d5ee

Please sign in to comment.