From 95ad41ffaa5edfa416eb2155e50e64d5c9d32260 Mon Sep 17 00:00:00 2001 From: Alex Alzate Date: Wed, 4 Sep 2024 16:45:16 -0500 Subject: [PATCH] Remove unused imports Signed-off-by: Alex Alzate --- .../java/org/cyclonedx/generators/json/BomJsonGenerator.java | 1 + .../java/org/cyclonedx/generators/xml/BomXmlGenerator.java | 4 ++++ .../java/org/cyclonedx/model/attestation/Attestation.java | 1 - src/main/java/org/cyclonedx/model/attestation/Claim.java | 1 - .../cyclonedx/model/attestation/affirmation/Affirmation.java | 2 -- .../model/component/crypto/AlgorithmProperties.java | 5 ++++- .../org/cyclonedx/model/formulation/common/AbstractType.java | 1 - .../util/deserializer/AbstractDataTypeDeserializer.java | 1 - 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/cyclonedx/generators/json/BomJsonGenerator.java b/src/main/java/org/cyclonedx/generators/json/BomJsonGenerator.java index a462d6bb1..cb9260bc2 100644 --- a/src/main/java/org/cyclonedx/generators/json/BomJsonGenerator.java +++ b/src/main/java/org/cyclonedx/generators/json/BomJsonGenerator.java @@ -45,6 +45,7 @@ public class BomJsonGenerator extends AbstractBomGenerator /** * Constructs a new BomGenerator object. * @param bom the BOM to generate + * @param version the version of the CycloneDX schema to use. */ public BomJsonGenerator(Bom bom, final Version version) { super(version, bom, Format.JSON); diff --git a/src/main/java/org/cyclonedx/generators/xml/BomXmlGenerator.java b/src/main/java/org/cyclonedx/generators/xml/BomXmlGenerator.java index fe721d092..e3a06890b 100644 --- a/src/main/java/org/cyclonedx/generators/xml/BomXmlGenerator.java +++ b/src/main/java/org/cyclonedx/generators/xml/BomXmlGenerator.java @@ -48,6 +48,7 @@ public class BomXmlGenerator extends AbstractBomGenerator /** * Constructs a new BomXmlGenerator object. * @param bom the BOM to generate + * @param version the version of the CycloneDX schema to use. */ public BomXmlGenerator(final Bom bom, final Version version) { super(version, bom, Format.XML); @@ -121,6 +122,7 @@ String toXML(final Bom bom, final boolean prettyPrint) throws GeneratorException * Creates a CycloneDX BoM from a set of Components. * @return an XML Document representing a CycloneDX BoM * @since 1.1.0 + * @throws ParserConfigurationException if an error occurs */ public Document generate() throws ParserConfigurationException { return generateDocument(bom); @@ -138,6 +140,8 @@ public String toXmlString() throws GeneratorException { * * @return a String of the BoM * @since 1.1.0 + * + * @throws GeneratorException if an error occurs */ @Override public String toString() { diff --git a/src/main/java/org/cyclonedx/model/attestation/Attestation.java b/src/main/java/org/cyclonedx/model/attestation/Attestation.java index 9080f3d9f..27dd01dc2 100644 --- a/src/main/java/org/cyclonedx/model/attestation/Attestation.java +++ b/src/main/java/org/cyclonedx/model/attestation/Attestation.java @@ -2,7 +2,6 @@ import java.util.List; import java.util.Objects; -import javax.xml.bind.annotation.XmlElement; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/src/main/java/org/cyclonedx/model/attestation/Claim.java b/src/main/java/org/cyclonedx/model/attestation/Claim.java index fdb9d9f8d..d16d1bae5 100644 --- a/src/main/java/org/cyclonedx/model/attestation/Claim.java +++ b/src/main/java/org/cyclonedx/model/attestation/Claim.java @@ -2,7 +2,6 @@ import java.util.List; import java.util.Objects; -import javax.xml.bind.annotation.XmlElement; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/src/main/java/org/cyclonedx/model/attestation/affirmation/Affirmation.java b/src/main/java/org/cyclonedx/model/attestation/affirmation/Affirmation.java index dcba33b86..39dc42f2b 100644 --- a/src/main/java/org/cyclonedx/model/attestation/affirmation/Affirmation.java +++ b/src/main/java/org/cyclonedx/model/attestation/affirmation/Affirmation.java @@ -2,11 +2,9 @@ import java.util.List; import java.util.Objects; -import javax.xml.bind.annotation.XmlElement; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; diff --git a/src/main/java/org/cyclonedx/model/component/crypto/AlgorithmProperties.java b/src/main/java/org/cyclonedx/model/component/crypto/AlgorithmProperties.java index 77c847cde..24f08dae2 100644 --- a/src/main/java/org/cyclonedx/model/component/crypto/AlgorithmProperties.java +++ b/src/main/java/org/cyclonedx/model/component/crypto/AlgorithmProperties.java @@ -25,7 +25,10 @@ "curve", "executionEnvironment", "implementationPlatform", - "certificationLevel", "mode", "padding", "cryptoFunctions", + "certificationLevel", + "mode", + "padding", + "cryptoFunctions", "classicalSecurityLevel", "nistQuantumSecurityLevel" }) public class AlgorithmProperties diff --git a/src/main/java/org/cyclonedx/model/formulation/common/AbstractType.java b/src/main/java/org/cyclonedx/model/formulation/common/AbstractType.java index d58eff4c7..8e2561898 100644 --- a/src/main/java/org/cyclonedx/model/formulation/common/AbstractType.java +++ b/src/main/java/org/cyclonedx/model/formulation/common/AbstractType.java @@ -44,7 +44,6 @@ public void setResource(final ResourceReferenceChoice resource) { this.resource = resource; } - @JacksonXmlElementWrapper(localName = "environmentVars") public EnvironmentVars getEnvironmentVars() { return environmentVars; diff --git a/src/main/java/org/cyclonedx/util/deserializer/AbstractDataTypeDeserializer.java b/src/main/java/org/cyclonedx/util/deserializer/AbstractDataTypeDeserializer.java index a653e55fc..8904500dc 100644 --- a/src/main/java/org/cyclonedx/util/deserializer/AbstractDataTypeDeserializer.java +++ b/src/main/java/org/cyclonedx/util/deserializer/AbstractDataTypeDeserializer.java @@ -70,7 +70,6 @@ protected void setSourceAndTarget(JsonNode node, AbstractType type) throws JsonP setReference(node, "target", type); } - protected void setProperties(JsonNode node, T type) throws JsonProcessingException {