From d0c9bb622ced6e61066766ea7c1e35fd62cdd610 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Wed, 9 Oct 2024 14:46:58 +0300 Subject: [PATCH] Remove unused imports --- .../src/main/java/org/eclipse/openvsx/UserAPI.java | 1 - .../org/eclipse/openvsx/entities/Extension.java | 14 +++++++------- .../openvsx/json/VersionTargetPlatformsJson.java | 2 -- .../GenerateKeyPairJobRequestHandler.java | 2 -- .../repositories/AdminStatisticsRepository.java | 1 - .../repositories/ExtensionReviewRepository.java | 9 ++------- .../openvsx/storage/GoogleCloudStorageService.java | 1 - .../eclipse/openvsx/storage/IStorageService.java | 1 - 8 files changed, 9 insertions(+), 22 deletions(-) diff --git a/server/src/main/java/org/eclipse/openvsx/UserAPI.java b/server/src/main/java/org/eclipse/openvsx/UserAPI.java index f5fc5d1db..5e53dc616 100644 --- a/server/src/main/java/org/eclipse/openvsx/UserAPI.java +++ b/server/src/main/java/org/eclipse/openvsx/UserAPI.java @@ -11,7 +11,6 @@ import jakarta.servlet.http.HttpServletRequest; import org.eclipse.openvsx.eclipse.EclipseService; -import org.eclipse.openvsx.entities.Extension; import org.eclipse.openvsx.entities.NamespaceMembership; import org.eclipse.openvsx.entities.UserData; import org.eclipse.openvsx.json.*; diff --git a/server/src/main/java/org/eclipse/openvsx/entities/Extension.java b/server/src/main/java/org/eclipse/openvsx/entities/Extension.java index d1a88e6b4..5a6fbc47b 100644 --- a/server/src/main/java/org/eclipse/openvsx/entities/Extension.java +++ b/server/src/main/java/org/eclipse/openvsx/entities/Extension.java @@ -9,17 +9,17 @@ ********************************************************************************/ package org.eclipse.openvsx.entities; -import java.io.Serializable; -import java.time.LocalDateTime; -import java.time.ZoneOffset; -import java.util.*; -import java.util.stream.Collectors; - import jakarta.persistence.*; - import org.eclipse.openvsx.search.ExtensionSearch; import org.eclipse.openvsx.util.NamingUtil; +import java.io.Serializable; +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + @Entity @Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "publicId" }), diff --git a/server/src/main/java/org/eclipse/openvsx/json/VersionTargetPlatformsJson.java b/server/src/main/java/org/eclipse/openvsx/json/VersionTargetPlatformsJson.java index 6282af42f..ed11a8f1c 100644 --- a/server/src/main/java/org/eclipse/openvsx/json/VersionTargetPlatformsJson.java +++ b/server/src/main/java/org/eclipse/openvsx/json/VersionTargetPlatformsJson.java @@ -9,6 +9,4 @@ * ****************************************************************************** */ package org.eclipse.openvsx.json; -import java.util.List; - public record VersionTargetPlatformsJson(String version, String[] targetPlatforms) {} diff --git a/server/src/main/java/org/eclipse/openvsx/migration/GenerateKeyPairJobRequestHandler.java b/server/src/main/java/org/eclipse/openvsx/migration/GenerateKeyPairJobRequestHandler.java index 4dc00524d..a372193e5 100644 --- a/server/src/main/java/org/eclipse/openvsx/migration/GenerateKeyPairJobRequestHandler.java +++ b/server/src/main/java/org/eclipse/openvsx/migration/GenerateKeyPairJobRequestHandler.java @@ -13,12 +13,10 @@ import org.eclipse.openvsx.entities.ExtensionVersion; import org.eclipse.openvsx.entities.FileResource; import org.eclipse.openvsx.repositories.RepositoryService; -import org.eclipse.openvsx.util.TimeUtil; import org.jobrunr.jobs.lambdas.JobRequestHandler; import org.jobrunr.scheduling.JobRequestScheduler; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.data.util.Streamable; import org.springframework.stereotype.Component; import static org.eclipse.openvsx.entities.FileResource.DOWNLOAD_SIG; diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticsRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticsRepository.java index b87933ed8..a46e6c66f 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticsRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/AdminStatisticsRepository.java @@ -11,7 +11,6 @@ import org.eclipse.openvsx.entities.AdminStatistics; import org.springframework.data.repository.Repository; -import org.springframework.data.util.Streamable; public interface AdminStatisticsRepository extends Repository { diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionReviewRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionReviewRepository.java index d32b0f547..396cca8a9 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionReviewRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionReviewRepository.java @@ -9,19 +9,14 @@ ********************************************************************************/ package org.eclipse.openvsx.repositories; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.Repository; -import org.springframework.data.util.Streamable; - import org.eclipse.openvsx.entities.Extension; import org.eclipse.openvsx.entities.ExtensionReview; import org.eclipse.openvsx.entities.UserData; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.Repository; import org.springframework.data.util.Streamable; -import java.time.LocalDateTime; - import static org.eclipse.openvsx.cache.CacheService.CACHE_AVERAGE_REVIEW_RATING; public interface ExtensionReviewRepository extends Repository { diff --git a/server/src/main/java/org/eclipse/openvsx/storage/GoogleCloudStorageService.java b/server/src/main/java/org/eclipse/openvsx/storage/GoogleCloudStorageService.java index a1f978fe8..e9e39262a 100644 --- a/server/src/main/java/org/eclipse/openvsx/storage/GoogleCloudStorageService.java +++ b/server/src/main/java/org/eclipse/openvsx/storage/GoogleCloudStorageService.java @@ -23,7 +23,6 @@ import org.springframework.data.util.Pair; import org.springframework.stereotype.Component; -import java.io.FileOutputStream; import java.io.IOException; import java.net.URI; import java.nio.ByteBuffer; diff --git a/server/src/main/java/org/eclipse/openvsx/storage/IStorageService.java b/server/src/main/java/org/eclipse/openvsx/storage/IStorageService.java index ab1f3b81b..d8ea45438 100644 --- a/server/src/main/java/org/eclipse/openvsx/storage/IStorageService.java +++ b/server/src/main/java/org/eclipse/openvsx/storage/IStorageService.java @@ -14,7 +14,6 @@ import org.eclipse.openvsx.util.TempFile; import org.springframework.data.util.Pair; -import java.io.IOException; import java.net.URI; import java.util.List;