diff options
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java | 7 | ||||
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java b/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java index 302d78538bc..a5cb54aa487 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java @@ -107,13 +107,13 @@ public class TestUtils { try { FileUtils.deleteDirectory(dir); } catch (IOException e) { - throw new RuntimeException("Can not delete the directory " + dir); + throw new SonarException("Can not delete the directory " + dir, e); } } try { FileUtils.forceMkdir(dir); } catch (IOException e) { - throw new RuntimeException("Can not create the directory " + dir); + throw new SonarException("Can not create the directory " + dir, e); } return dir; } @@ -134,7 +134,6 @@ public class TestUtils { static Diff isSimilarXml(String expectedXml, String xml) throws IOException, SAXException { XMLUnit.setIgnoreWhitespace(true); - Diff diff = XMLUnit.compareXML(xml, expectedXml); - return diff; + return XMLUnit.compareXML(xml, expectedXml); } } diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java index c92be0960aa..ab664c07fc7 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java @@ -21,7 +21,6 @@ package org.sonar.test.channel; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.sonar.channel.Channel; import org.sonar.channel.CodeReader; public class ReaderHasNextCharMatcher extends BaseMatcher<CodeReader> { |