From 8b162f1f5718b1c25bbf83ab75f731043ddf30ea Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Sun, 11 Sep 2011 20:46:29 +0200 Subject: SONAR-2603 increase size of server id --- .../src/main/java/org/sonar/server/platform/ServerIdGenerator.java | 2 +- .../src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sonar-server') diff --git a/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java b/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java index 3577effe7e6..7d09dd95c99 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java @@ -42,7 +42,7 @@ public class ServerIdGenerator { */ static final String VERSION = "1"; - static final int CHECKSUM_SIZE = 9; + static final int CHECKSUM_SIZE = 14; private final boolean acceptPrivateAddress; diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java index 73677bec163..354e19435ea 100644 --- a/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java +++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerIdGeneratorTest.java @@ -42,7 +42,7 @@ public class ServerIdGeneratorTest { @Test public void idShouldHaveTenCharacters() { String id = new ServerIdGenerator().toId("SonarSource", localhost); - assertThat(id.length(), Is.is(10)); // first character is version + 9 characters for checksum + assertThat(id.length(), Is.is(15)); // first character is version + 14 characters for checksum assertThat(StringUtils.isBlank(id), Is.is(false)); } -- cgit v1.2.3