diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-03-27 23:43:19 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-03-27 23:43:19 +0200 |
commit | d4ae5228bb668e65baa644b52d41286d5f3d55cd (patch) | |
tree | 8b3f18401fade28db31c1b9364e2f4ebad2b017d /sonar-testing-harness/src | |
parent | 2b560c35ab24a4f7db27d7e180a64e830b9a56a1 (diff) | |
download | sonarqube-d4ae5228bb668e65baa644b52d41286d5f3d55cd.tar.gz sonarqube-d4ae5228bb668e65baa644b52d41286d5f3d55cd.zip |
Fix coding violations
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> { |