Implement new tests on Project Coin.
Test cases
I) Allow effectively-final variables to be used as resources in the try-with-resources statement.
1) Check variable && old style declaration in one try block
2) Null tests
- resource variable assigned to null
- try (null) construction
3) Accessibility of variable
- Check that in case of variable it could be acessible from catch and finally blocks; opposite of ResourceOutsideTry.java
4) Redeclaration of resource var inside twr block
- redeclare as resource
- redeclare as Object
- redeclare as exception in catch block
5) Twr and variable of parametrized type
6) TWR on non-resource
- use class with *close()* method but not implementing AutoCloseable/Closeabe interfaces (look at TwrOnNonResource.java)
7) WeirdTwr.java
- Update with *try (v1; MyResource v2 = v1)*
8) T7022711.java
- Make sure the bug 7022711 does not exist for variable case
9) T7032633.java
- Make sure the bug 7032633 does not exist for variable case
II) Support for private methods in interfaces
1) access issues
- should not be accessible on try to call the method from outside
- should not be accessible while inheritance
* interface which extends interface with private method
* class which implements interface with private method
- private abstract method with body
NOTE: will be implemented as reg test for https://bugs.openjdk.java.net/browse/JDK-8080726 - Redundant error message on private abstract interface method with body
2) generics
- check that parametrized interfaces with private methods still works fine
Test cases
I) Allow effectively-final variables to be used as resources in the try-with-resources statement.
1) Check variable && old style declaration in one try block
2) Null tests
- resource variable assigned to null
- try (null) construction
3) Accessibility of variable
- Check that in case of variable it could be acessible from catch and finally blocks; opposite of ResourceOutsideTry.java
4) Redeclaration of resource var inside twr block
- redeclare as resource
- redeclare as Object
- redeclare as exception in catch block
5) Twr and variable of parametrized type
6) TWR on non-resource
- use class with *close()* method but not implementing AutoCloseable/Closeabe interfaces (look at TwrOnNonResource.java)
7) WeirdTwr.java
- Update with *try (v1; MyResource v2 = v1)*
8) T7022711.java
- Make sure the bug 7022711 does not exist for variable case
9) T7032633.java
- Make sure the bug 7032633 does not exist for variable case
II) Support for private methods in interfaces
1) access issues
- should not be accessible on try to call the method from outside
- should not be accessible while inheritance
* interface which extends interface with private method
* class which implements interface with private method
- private abstract method with body
NOTE: will be implemented as reg test for https://bugs.openjdk.java.net/browse/JDK-8080726 - Redundant error message on private abstract interface method with body
2) generics
- check that parametrized interfaces with private methods still works fine
- relates to
-
JDK-8042880 JEP 213: Milling Project Coin
-
- Closed
-