]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 improve logging of profile name
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 20 Jun 2014 13:22:30 +0000 (15:22 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 20 Jun 2014 13:27:19 +0000 (15:27 +0200)
sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileName.java
sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryMediumTest.java
sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileNameTest.java

index 783da3ec7bfc309accee553538cbf5aff4c4c149..ec97754abeff825fc7f1bf11d0992d78e8c44e54 100644 (file)
@@ -62,6 +62,6 @@ public class QProfileName {
 
   @Override
   public String toString() {
-    return String.format("[%s, %s]", lang, name);
+    return String.format("{lang=%s, name=%s}", lang, name);
   }
 }
index 6a82bb51654d63dd8caa916afce9d8645b20c5d5..caaab96473ba210da383553690f5afac64cb7135 100644 (file)
@@ -96,7 +96,7 @@ public class QProfileFactoryMediumTest {
       factory.create(dbSession, name);
       fail();
     } catch (BadRequestException e) {
-      assertThat(e).hasMessage("Quality profile already exists: QProfile{lang=xoo, name=P1}");
+      assertThat(e).hasMessage("Quality profile already exists: {lang=xoo, name=P1}");
     }
   }
 
index 00062ff8de9de69fc58c01edf6341d8556e64efc..ad57cc44ad45377062053cd18af297eeaf1f7b7b 100644 (file)
@@ -41,6 +41,6 @@ public class QProfileNameTest {
 
   @Test
   public void to_string() throws Exception {
-    assertThat(new QProfileName("xoo", "p1").toString()).isEqualTo("[xoo, p1]");
+    assertThat(new QProfileName("xoo", "p1").toString()).isEqualTo("{lang=xoo, name=p1}");
   }
 }