Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Commit

Permalink
fixup! Fix Sonar analysis bug issue (#56)
Browse files Browse the repository at this point in the history
Use SuppressWarnings instead of NOSONAR
  • Loading branch information
Sandro Heinzelmann authored and sandro-h committed Feb 20, 2020
1 parent d705e9c commit e51e80c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ private File getReportTaskFile() {
}

@VisibleForTesting
// We have to treat a premature interrupt as a failure since we couldn't retrieve the analysis id.
@SuppressWarnings("squid:S2142")
String getAnalysisId(WsClient wsClient, String ceTaskId) {
WsRequest ceTaskRequest =
new GetRequest("api/ce/task").setParam("id", ceTaskId).setMediaType(MediaTypes.PROTOBUF);
Expand Down Expand Up @@ -203,8 +205,7 @@ String getAnalysisId(WsClient wsClient, String ceTaskId) {
throw new IllegalStateException(
"Report processing did not complete successfully: " + taskStatus);
}
} catch (IOException | InterruptedException e) { // NOSONAR: We have to treat a premature
// interrupt as a failure since we couldn't retrieve the analysis id (java:S2142)
} catch (IOException | InterruptedException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
Expand Down

0 comments on commit e51e80c

Please sign in to comment.