File tree Expand file tree Collapse file tree
java-checks-test-sources/default/src/main/java/checks
java-checks/src/main/java/org/sonar/java/checks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public void throws_Error() {
2424// ^^^^^
2525 }
2626
27- public void throws_Exception () throws Exception { // Noncompliant {{Define and throw a dedicated exception instead of using a generic one .}}
27+ public void throws_Exception () throws Exception { // Noncompliant {{Replace generic exceptions with specific library exceptions or a custom exception .}}
2828 throw new Exception (); // Noncompliant
2929 }
3030
@@ -63,7 +63,7 @@ public void exception() {
6363 public RawExceptionCheckSample () throws
6464 Throwable , // Noncompliant
6565 Error , // Noncompliant
66- Exception { // Noncompliant {{Define and throw a dedicated exception instead of using a generic one .}}
66+ Exception { // Noncompliant {{Replace generic exceptions with specific library exceptions or a custom exception .}}
6767 throw new
6868 Throwable (); // Noncompliant
6969
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ private void reportIssue(Tree tree) {
9090 context .newIssue ()
9191 .forRule (this )
9292 .onTree (tree )
93- .withMessage ("Define and throw a dedicated exception instead of using a generic one ." )
93+ .withMessage ("Replace generic exceptions with specific library exceptions or a custom exception ." )
9494 .report ();
9595 }
9696
You can’t perform that action at this time.
0 commit comments