diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-12-18 10:00:18 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-12-18 10:00:18 +0100 |
commit | daf70b2c4c8b962179ecdeec24a8ea5e07e307af (patch) | |
tree | 7b32851ac2f59f48cf1252092263fc19957e5091 /sonar-testing-harness | |
parent | feb13a2e4ab1234dc8f11c10efe692c96bf418ee (diff) | |
download | sonarqube-daf70b2c4c8b962179ecdeec24a8ea5e07e307af.tar.gz sonarqube-daf70b2c4c8b962179ecdeec24a8ea5e07e307af.zip |
fix quality flaws
Diffstat (limited to 'sonar-testing-harness')
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/ExceptionCauseMatcher.java | 5 |
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 |