diff options
author | Pierre <pierre.guillot@sonarsource.com> | 2022-10-24 10:36:11 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-10-31 20:03:01 +0000 |
commit | 2f0240e240315f67557900c1287d648035fa4704 (patch) | |
tree | 5b890b5d106bc555b9b8e25ae15e86e4d6663f70 /sonar-core | |
parent | e083a7dfb851c76144c44755c8fa21e4fa5bf841 (diff) | |
download | sonarqube-2f0240e240315f67557900c1287d648035fa4704.tar.gz sonarqube-2f0240e240315f67557900c1287d648035fa4704.zip |
SONAR-17152 removed deprecated license format support
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/platform/ServerId.java | 8 | ||||
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/platform/ServerId.java b/sonar-core/src/main/java/org/sonar/core/platform/ServerId.java index d5bc81e54c5..30861f3d600 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/ServerId.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/ServerId.java @@ -28,7 +28,6 @@ import java.util.Set; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; import org.sonar.api.CoreProperties; -import org.sonar.core.util.UuidFactory; import static com.google.common.base.Preconditions.checkArgument; import static org.sonar.core.platform.ServerId.Format.DEPRECATED; @@ -110,8 +109,8 @@ public final class ServerId { public static ServerId of(@Nullable String databaseId, String datasetId) { if (databaseId != null) { - int databaseIdLength = databaseId.length(); - checkArgument(databaseIdLength == DATABASE_ID_LENGTH, "Illegal databaseId length (%s)", databaseIdLength); + int databaseIdLength = databaseId.length(); + checkArgument(databaseIdLength == DATABASE_ID_LENGTH, "Illegal databaseId length (%s)", databaseIdLength); } int datasetIdLength = datasetId.length(); checkArgument(datasetIdLength == DEPRECATED_SERVER_ID_LENGTH @@ -120,9 +119,6 @@ public final class ServerId { return new ServerId(databaseId, datasetId); } - public static ServerId create(UuidFactory uuidFactory) { - return new ServerId(null, uuidFactory.create()); - } /** * Checks whether the specified value is a date according to the old format of the {@link CoreProperties#SERVER_ID}. diff --git a/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java b/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java index 57a7c2eae87..a63a3bff968 100644 --- a/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java +++ b/sonar-core/src/test/java/org/sonar/core/platform/ServerIdTest.java @@ -37,12 +37,12 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.sonar.core.platform.ServerId.DATABASE_ID_LENGTH; import static org.sonar.core.platform.ServerId.DEPRECATED_SERVER_ID_LENGTH; -import static org.sonar.core.platform.ServerId.NOT_UUID_DATASET_ID_LENGTH; -import static org.sonar.core.platform.ServerId.SPLIT_CHARACTER; -import static org.sonar.core.platform.ServerId.UUID_DATASET_ID_LENGTH; import static org.sonar.core.platform.ServerId.Format.DEPRECATED; import static org.sonar.core.platform.ServerId.Format.NO_DATABASE_ID; import static org.sonar.core.platform.ServerId.Format.WITH_DATABASE_ID; +import static org.sonar.core.platform.ServerId.NOT_UUID_DATASET_ID_LENGTH; +import static org.sonar.core.platform.ServerId.SPLIT_CHARACTER; +import static org.sonar.core.platform.ServerId.UUID_DATASET_ID_LENGTH; @RunWith(DataProviderRunner.class) public class ServerIdTest { |