JDK-8080641 : JEP-JDK-8042880 : Implement new tests on Project Coin
  • Type: Task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-05-19
  • Updated: 2016-01-07
  • Resolved: 2015-12-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b97Fixed
Related Reports
Relates :  
Description
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