Skip to content

Commit

Permalink
Improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-zepol committed Apr 7, 2024
1 parent 0c61f82 commit 624307a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions src/main/java/org/cyclonedx/model/Bom.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,35 +63,35 @@ public class Bom extends ExtensibleElement {
@JacksonXmlProperty(isAttribute = true)
private String xmlns;

@VersionFilter(value = Version.VERSION_12)
@VersionFilter(Version.VERSION_12)
private Metadata metadata;

private List<Component> components;

@VersionFilter(value = Version.VERSION_12)
@VersionFilter(Version.VERSION_12)
private List<Service> services;

@VersionFilter(value = Version.VERSION_11)
@VersionFilter(Version.VERSION_11)
private DependencyList dependencies;

@VersionFilter(value = Version.VERSION_11)
@VersionFilter(Version.VERSION_11)
@JsonDeserialize(using = ExternalReferencesDeserializer.class)
private List<ExternalReference> externalReferences;

@VersionFilter(value = Version.VERSION_13)
@VersionFilter(Version.VERSION_13)
private List<Composition> compositions;

@VersionFilter(value = Version.VERSION_15)
@VersionFilter(Version.VERSION_15)
private List<Formula> formulation;

@VersionFilter(value = Version.VERSION_14)
@VersionFilter(Version.VERSION_14)
@JsonDeserialize(using = VulnerabilityDeserializer.class)
private List<Vulnerability> vulnerabilities;

@VersionFilter(value = Version.VERSION_15)
@VersionFilter(Version.VERSION_15)
private List<Annotation> annotations;

@VersionFilter(value = Version.VERSION_13)
@VersionFilter(Version.VERSION_13)
private List<Property> properties;

@JacksonXmlProperty(isAttribute = true)
Expand All @@ -107,7 +107,7 @@ public class Bom extends ExtensibleElement {
private String bomFormat;

@JsonOnly
@VersionFilter(value = Version.VERSION_14)
@VersionFilter(Version.VERSION_14)
private Signature signature;

public Metadata getMetadata() {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/cyclonedx/model/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public enum Type {
MACHINE_LEARNING_MODEL("machine-learning-model"),
@JsonProperty("data")
DATA("data"),
@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
@JsonProperty("cryptographic-asset")
CRYPTOGRAPHIC_ASSET("cryptographic-asset");

Expand Down Expand Up @@ -185,11 +185,11 @@ public String getScopeName() {
@JsonProperty("data")
private ComponentData data;

@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
@JsonProperty("cryptoProperties")
private CryptoProperties cryptoProperties;

@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
@JsonProperty("provides")
private List<String> provides;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ public class Occurrence extends ExtensibleElement

private String location;

@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
private Integer line;

@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
private Integer offset;

@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
private Integer symbol;

@VersionFilter(value = Version.VERSION_16)
@VersionFilter(Version.VERSION_16)
private String additionalContext;

public String getBomRef() {
Expand Down

0 comments on commit 624307a

Please sign in to comment.