From cb2f76a16944e74801a7820c16a3201916392c31 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 20 May 2013 16:13:03 +0200 Subject: [PATCH] SONAR-4340 Don't show Obeo license property --- .../src/main/java/org/sonar/api/config/License.java | 3 ++- .../src/test/java/org/sonar/api/config/LicenseTest.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/License.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/License.java index 12d22ab6af1..c9f5cb635c6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/License.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/License.java @@ -56,8 +56,9 @@ public final class License { expirationDate = StringUtils.defaultString(get("Expiration", properties), get("Expires", properties)); type = get("Type", properties); server = get("Server", properties); - // SONAR-4340 Don't expose Digest property + // SONAR-4340 Don't expose Digest and Obeo properties additionalProperties.remove("Digest"); + additionalProperties.remove("Obeo"); } private String get(String key, Map properties) { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java index a2125a7e4c9..a589e80c2ca 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java @@ -40,7 +40,8 @@ public class LicenseTest { "Plugin: SQALE\n" + " Expires: 2012-05-18 \n" + "Other: field\n" + - "Digest: abcdef\n"; + "Digest: abcdef\n" + + "Obeo: obeo\n"; @Test public void readPlainTest() { @@ -142,5 +143,6 @@ public class LicenseTest { assertThat(license.additionalProperties().get("Other")).isEqualTo("field"); assertThat(license.additionalProperties().containsKey("Digest")).isFalse(); + assertThat(license.additionalProperties().containsKey("Obeo")).isFalse(); } } -- 2.39.5