Skip to content

Commit

Permalink
refactor(SniperJavaPrettyPrinter): disable sonar for false positives (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus authored and nharrand committed Dec 6, 2019
1 parent 26f03c4 commit 77b7b4e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private void runInContext(SourceFragmentContext context, Runnable code) {
//remove `context` and all it's child contexts
while (true) {
if (sourceFragmentContextStack.isEmpty()) {
throw new SpoonException("Inconsistent sourceFragmentContextStack");
throw new SpoonException("Inconsistent sourceFragmentContextStack"); //NOSONAR
}
SourceFragmentContext c = sourceFragmentContextStack.pop();
c.onFinished();
Expand Down Expand Up @@ -418,9 +418,9 @@ private void runInMutedState(Boolean muted, Runnable code) {
//assure that muted status did not changed in between
if (mutableTokenWriter.isMuted() != muted) {
if (mutableTokenWriter.isMuted()) {
throw new SpoonException("Unexpected state: Token writer is muted after scanning");
throw new SpoonException("Unexpected state: Token writer is muted after scanning"); //NOSONAR
} else {
throw new SpoonException("Unexpected state: Token writer is not muted after scanning");
throw new SpoonException("Unexpected state: Token writer is not muted after scanning"); //NOSONAR
}
}
mutableTokenWriter.setMuted(originMuted);
Expand Down

0 comments on commit 77b7b4e

Please sign in to comment.