diff --git a/.checkstyle.xml b/.checkstyle.xml index 3682cfab3..a59d43969 100644 --- a/.checkstyle.xml +++ b/.checkstyle.xml @@ -6,7 +6,7 @@ - + diff --git a/pom.xml b/pom.xml index 6933f9ac1..81492f1d0 100644 --- a/pom.xml +++ b/pom.xml @@ -86,41 +86,44 @@ ${project.parent.version} 4.2.0 0.4.4 - 1.14.1 - 2.0.2 + 10.13.0 + 1.16.0 + 1.25.0 + 2.1.0 1.4.2 1.0.1 8.0.3 - 2.16.0 - 2.15.2 + 2.16.1 + 2.16.1 2.3.6 - 3.42.0 + 3.45.0 3.2.4 3.6.1 3.6.0 + 4.26.0 0.2.2 - 1.4.1 + 8.5.8 + 1.5.0 0.5.2.8 - 3.2.0 + 3.2.2 3.25.3 1.18.3 - 2.1.0 - 1.1.10.5 + 2.2.0 + 1.19.0 0.4.1 - 6.4.0 + 6.6.0 1.1.1 2.0.12 - 2.1.1 4.5.14 5.11.0 1.4.0 - - 42.7.0 + 42.7.1 application json false + 3.3.1 3.11.4 10.0.20 @@ -130,8 +133,6 @@ cyclonedx true - 4.25.0 - 8.5.8 @@ -145,31 +146,6 @@ - - - - us.springett - alpine-executable-war - - - org.eclipse.jetty - jetty-webapp-logging - - - - - - - org.xerial.snappy - snappy-java - ${lib.snappy-java.version} - - - - @@ -436,7 +412,7 @@ org.apache.commons commons-compress - 1.25.0 + ${lib.commons-compress.version} @@ -500,7 +476,7 @@ com.github.stefanbirkner system-rules - 1.19.0 + ${lib.system-rules.version} test @@ -602,25 +578,25 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.1 + ${plugin.checkstyle.version} ${project.basedir}/.checkstyle.xml false false - - - - - - - - + + + validate + + check + + + com.puppycrawl.tools checkstyle - 10.12.5 + ${lib.checkstyle.version} diff --git a/src/main/java/org/dependencytrack/integrations/kenna/KennaDataTransformer.java b/src/main/java/org/dependencytrack/integrations/kenna/KennaDataTransformer.java index c4548bf98..b6a0634f2 100644 --- a/src/main/java/org/dependencytrack/integrations/kenna/KennaDataTransformer.java +++ b/src/main/java/org/dependencytrack/integrations/kenna/KennaDataTransformer.java @@ -25,7 +25,6 @@ import org.dependencytrack.model.Severity; import org.dependencytrack.model.Tag; import org.dependencytrack.model.Vulnerability; -import org.dependencytrack.parser.common.resolver.CweResolver; import org.dependencytrack.persistence.QueryManager; import org.dependencytrack.util.DateUtil; import org.json.JSONArray; diff --git a/src/main/java/org/dependencytrack/model/MetaModel.java b/src/main/java/org/dependencytrack/model/MetaModel.java index ab2446f88..8cc00a677 100644 --- a/src/main/java/org/dependencytrack/model/MetaModel.java +++ b/src/main/java/org/dependencytrack/model/MetaModel.java @@ -20,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import org.dependencytrack.model.Component; import java.util.Date; diff --git a/src/main/java/org/dependencytrack/model/VulnerableSoftware.java b/src/main/java/org/dependencytrack/model/VulnerableSoftware.java index b71e51e66..129b65106 100644 --- a/src/main/java/org/dependencytrack/model/VulnerableSoftware.java +++ b/src/main/java/org/dependencytrack/model/VulnerableSoftware.java @@ -18,14 +18,9 @@ */ package org.dependencytrack.model; -import alpine.common.validation.RegexSequence; -import alpine.server.json.TrimmedStringDeserializer; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import org.dependencytrack.resources.v1.serializers.Iso8601DateSerializer; import javax.jdo.annotations.Column; import javax.jdo.annotations.Element; @@ -38,12 +33,8 @@ import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import javax.jdo.annotations.Unique; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; import java.io.Serializable; import java.util.ArrayList; -import java.util.Date; import java.util.List; import java.util.UUID; diff --git a/src/main/java/org/dependencytrack/persistence/PolicyQueryManager.java b/src/main/java/org/dependencytrack/persistence/PolicyQueryManager.java index da4c70991..619aac808 100644 --- a/src/main/java/org/dependencytrack/persistence/PolicyQueryManager.java +++ b/src/main/java/org/dependencytrack/persistence/PolicyQueryManager.java @@ -33,7 +33,6 @@ import javax.jdo.PersistenceManager; import javax.jdo.Query; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/org/dependencytrack/resources/v1/AccessControlResource.java b/src/main/java/org/dependencytrack/resources/v1/AccessControlResource.java index 20af5ec83..7bff4876a 100644 --- a/src/main/java/org/dependencytrack/resources/v1/AccessControlResource.java +++ b/src/main/java/org/dependencytrack/resources/v1/AccessControlResource.java @@ -19,7 +19,6 @@ package org.dependencytrack.resources.v1; import alpine.common.logging.Logger; -import alpine.model.ConfigProperty; import alpine.model.Team; import alpine.persistence.PaginatedResult; import alpine.server.auth.PermissionRequired; @@ -31,7 +30,6 @@ import io.swagger.annotations.ApiResponses; import io.swagger.annotations.Authorization; import org.dependencytrack.auth.Permissions; -import org.dependencytrack.model.ConfigPropertyConstants; import org.dependencytrack.model.Project; import org.dependencytrack.persistence.QueryManager; import org.dependencytrack.resources.v1.vo.AclMappingRequest; diff --git a/src/main/java/org/dependencytrack/resources/v1/ConfigPropertyResource.java b/src/main/java/org/dependencytrack/resources/v1/ConfigPropertyResource.java index 034f7b084..b3e0283c5 100644 --- a/src/main/java/org/dependencytrack/resources/v1/ConfigPropertyResource.java +++ b/src/main/java/org/dependencytrack/resources/v1/ConfigPropertyResource.java @@ -19,7 +19,6 @@ package org.dependencytrack.resources.v1; import alpine.model.ConfigProperty; -import alpine.model.IConfigProperty; import alpine.server.auth.PermissionRequired; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/src/main/java/org/dependencytrack/resources/v1/VexResource.java b/src/main/java/org/dependencytrack/resources/v1/VexResource.java index c78391894..f2f59d19d 100644 --- a/src/main/java/org/dependencytrack/resources/v1/VexResource.java +++ b/src/main/java/org/dependencytrack/resources/v1/VexResource.java @@ -34,7 +34,6 @@ import org.cyclonedx.CycloneDxMediaType; import org.cyclonedx.exception.GeneratorException; import org.dependencytrack.auth.Permissions; -import org.dependencytrack.event.BomUploadEvent; import org.dependencytrack.event.VexUploadEvent; import org.dependencytrack.model.Project; import org.dependencytrack.parser.cyclonedx.CycloneDXExporter; diff --git a/src/main/java/org/dependencytrack/tasks/InternalComponentIdentificationTask.java b/src/main/java/org/dependencytrack/tasks/InternalComponentIdentificationTask.java index e9f3a0704..4ff6c0dda 100644 --- a/src/main/java/org/dependencytrack/tasks/InternalComponentIdentificationTask.java +++ b/src/main/java/org/dependencytrack/tasks/InternalComponentIdentificationTask.java @@ -40,9 +40,7 @@ import java.time.Instant; import java.util.List; -import static java.time.Duration.ZERO; import static org.dependencytrack.tasks.LockName.INTERNAL_COMPONENT_IDENTIFICATION_TASK_LOCK; -import static org.dependencytrack.tasks.LockName.PORTFOLIO_METRICS_TASK_LOCK; import static org.dependencytrack.util.LockProvider.isLockToBeExtended; /** diff --git a/src/main/java/org/dependencytrack/tasks/metrics/ComponentMetricsUpdateTask.java b/src/main/java/org/dependencytrack/tasks/metrics/ComponentMetricsUpdateTask.java index 166112995..b48eeb0ef 100644 --- a/src/main/java/org/dependencytrack/tasks/metrics/ComponentMetricsUpdateTask.java +++ b/src/main/java/org/dependencytrack/tasks/metrics/ComponentMetricsUpdateTask.java @@ -26,12 +26,9 @@ import org.dependencytrack.metrics.Metrics; import org.dependencytrack.model.Component; import org.dependencytrack.model.WorkflowState; -import org.dependencytrack.model.WorkflowStatus; import org.dependencytrack.persistence.QueryManager; import java.time.Duration; -import java.time.Instant; -import java.util.Date; import static org.dependencytrack.model.WorkflowStep.METRICS_UPDATE; diff --git a/src/main/java/org/dependencytrack/tasks/vulnerabilitypolicy/blobstorage/S3StorageHandler.java b/src/main/java/org/dependencytrack/tasks/vulnerabilitypolicy/blobstorage/S3StorageHandler.java index 024c376a9..3f7e05dec 100644 --- a/src/main/java/org/dependencytrack/tasks/vulnerabilitypolicy/blobstorage/S3StorageHandler.java +++ b/src/main/java/org/dependencytrack/tasks/vulnerabilitypolicy/blobstorage/S3StorageHandler.java @@ -2,7 +2,6 @@ import alpine.Config; import alpine.common.logging.Logger; -import io.opencensus.metrics.LongGauge; import org.apache.commons.codec.binary.Hex; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils;