Skip to content

Commit

Permalink
#343 Mark some Sonar issues
Browse files Browse the repository at this point in the history
and suppress warnings for the time being
  • Loading branch information
ascheman committed Sep 18, 2024
1 parent 243014e commit db1f7db
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void doesLinkTargetExist(String href) {
try {
linkTarget = URLDecoder.decode(linkTarget, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
throw new RuntimeException(e); //NOSONAR(S112)
}

if (!listOfIds.contains(linkTarget)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void doesImageFileExist(String relativePathToImageFile) {
try {
decodedRelativePathtoImageFile = URLDecoder.decode(relativePathToImageFile,"UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
throw new RuntimeException(e); //NOSONAR(S112)
}

File imageFile = new File(parentDir, decodedRelativePathtoImageFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public JUnitXmlReporter(PerRunResults runResults, String outputPath) {
@Override
protected void initReport() {
if (!outputPath.canWrite() && !outputPath.mkdirs()) {
throw new RuntimeException("Cannot create or write to " + outputPath);
throw new RuntimeException("Cannot create or write to " + outputPath); //NOSONAR(S112)
}
}

Expand Down Expand Up @@ -92,7 +92,7 @@ protected void reportPageSummary(SinglePageResults singlePageResults) {

writer.flush();
} catch (IOException | XMLStreamException e) {
throw new RuntimeException(e);
throw new RuntimeException(e); //NOSONAR(S112)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void install() {
}
catch (NoSuchAlgorithmException | KeyManagementException e)
{
throw new RuntimeException("Failed setting up all thrusting certificate manager.", e); //NOSONAR(S112)
throw new RuntimeException("Failed to set up all thrusting certificate managers.", e); //NOSONAR(S112)
}

}
Expand Down

0 comments on commit db1f7db

Please sign in to comment.