From 94011a48785c4259f0ed9dc5276c2b8aa5cc32ce Mon Sep 17 00:00:00 2001 From: nscuro Date: Mon, 19 Feb 2024 14:18:00 +0100 Subject: [PATCH] Remove unused imports to make checkstyle happy Signed-off-by: nscuro --- .../integrations/kenna/KennaDataTransformer.java | 1 - src/main/java/org/dependencytrack/model/MetaModel.java | 1 - .../org/dependencytrack/model/VulnerableSoftware.java | 9 --------- .../dependencytrack/persistence/PolicyQueryManager.java | 1 - .../resources/v1/AccessControlResource.java | 2 -- .../resources/v1/ConfigPropertyResource.java | 1 - .../org/dependencytrack/resources/v1/VexResource.java | 1 - .../tasks/InternalComponentIdentificationTask.java | 2 -- .../tasks/metrics/ComponentMetricsUpdateTask.java | 3 --- .../blobstorage/S3StorageHandler.java | 1 - 10 files changed, 22 deletions(-) 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;