...
Use Case 5: Find occurences of covariant array uses in assignment, method calls, constructor instantiations and return statements.
...
Rethrown Exception
...
Java 7 introduced an improved checking for rethrown exceptions. Previously, a rethrown exception was treated as throwing the type of the catch parameter. Now, when a catch parameter is declared final, the type is known to be only the exception types that were thrown in the try block and are a subtype of the catch parameter type.
...
Code Block |
---|
class Foo extends Exception {}
class SonOfFoo extends Foo {}
class DaughterOfFoo extends Foo {}
class Test {
void test() {
try {
throw new DaughterOfFoo();
} catch (Foo exception) {
try {
throw exception; // first incompatibility
} catch (SonOfFoo anotherException) {
// second incompatibility: is this block reachable?
}
}
}
}
|
...
| Final Array & Anonymous Class | Generic Constructors | Capture Conversion Idiom | Overloaded Methods | Covariant Arrays | Rethrown Exception Improved Exception Handling |
---|---|---|---|---|---|---|
JTL |
| X | X |
| X |
|
BBQ | X | X | X | ? | X |
|
SOUL |
|
|
|
|
|
|
JQuery | X | X | X | ? | X |
|
.QL |
|
|
|
| X |
|
Jackpot |
|
|
|
|
|
|
PMD |
|
|
|
| X |
|
...