File tree Expand file tree Collapse file tree
examples/maven-project/src/org/javacs/warn Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,4 +44,14 @@ void referenceUsedByUnusedVar() {
4444 }
4545
4646 void notActuallyThrown () throws Exception { }
47- }
47+
48+ interface Throws {
49+ void interfaceThrows () throws Exception ;
50+ }
51+
52+ abstract class AbstractThrows {
53+ abstract void abstractThrows () throws Exception ;
54+ }
55+
56+ native void nativeThrows () throws Exception ;
57+ }
Original file line number Diff line number Diff line change @@ -93,6 +93,9 @@ public void unused() {
9393 assertThat (errors , hasItem ("unused_method(34)" )); // private void unusedMutuallyRecursive2() { ... }
9494 assertThat (errors , not (hasItem ("unused_method(38)" ))); // private int usedByUnusedVar() { ... }
9595 assertThat (errors , hasItem ("unused_throws(46)" )); // void notActuallyThrown() throws Exception { }
96+ assertThat (errors , not (hasItem ("unused_throws(49)" ))); // void interfaceThrows() throws Exception;
97+ assertThat (errors , not (hasItem ("unused_throws(53)" ))); // abstract void abstractThrows() throws Exception;
98+ assertThat (errors , not (hasItem ("unused_throws(56)" ))); // native void nativeThrows() throws Exception;
9699 }
97100
98101 @ Test
You can’t perform that action at this time.
0 commit comments