aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-12-18 10:00:18 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-12-18 10:00:18 +0100
commitdaf70b2c4c8b962179ecdeec24a8ea5e07e307af (patch)
tree7b32851ac2f59f48cf1252092263fc19957e5091 /sonar-testing-harness/src
parentfeb13a2e4ab1234dc8f11c10efe692c96bf418ee (diff)
downloadsonarqube-daf70b2c4c8b962179ecdeec24a8ea5e07e307af.tar.gz
sonarqube-daf70b2c4c8b962179ecdeec24a8ea5e07e307af.zip
fix quality flaws
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/ExceptionCauseMatcher.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/ExceptionCauseMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/ExceptionCauseMatcher.java
index 803e3527180..14da5daa22d 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/ExceptionCauseMatcher.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/ExceptionCauseMatcher.java
@@ -70,7 +70,10 @@ public class ExceptionCauseMatcher extends TypeSafeMatcher<Throwable> {
if (expectedMessage == null) {
return true;
}
- return EXPECT_NO_MESSAGE_CONSTANT.equals(expectedMessage) ? item.getMessage() == null : item.getMessage().contains(expectedMessage);
+ if (EXPECT_NO_MESSAGE_CONSTANT.equals(expectedMessage)) {
+ return item.getMessage() == null;
+ }
+ return item.getMessage().contains(expectedMessage);
}
@Override