]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4340 Don't show Obeo license property
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 20 May 2013 14:13:03 +0000 (16:13 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Mon, 20 May 2013 14:13:03 +0000 (16:13 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/config/License.java
sonar-plugin-api/src/test/java/org/sonar/api/config/LicenseTest.java

index 12d22ab6af1f797dac0cc8e1eecf790be8e37908..c9f5cb635c6c344d9226801038a125edf9f12f46 100644 (file)
@@ -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<String, String> properties) {
index a2125a7e4c9120b09a8ffd6f4481cc6e428a361b..a589e80c2ca827eb76e2372aaf060f4aad0a9641 100644 (file)
@@ -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();
   }
 }