JDK-8227721 : test/jdk/java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java should open the java.net package
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-16
  • Updated: 2021-07-14
  • Resolved: 2019-07-24
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 14
14 b08Fixed
Related Reports
Relates :  
Description
test/jdk/java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java has been modified recently (see JDK-8225239), and now performs deep reflection ( setAccessible(true) ) on a non-public member, java.net.NetworkInterface::isBoundInetAddress. As such, the test should be run in othervm mode, and `open` the `java.net` to the unnamed module ( where the test lives ).

The following illegal access warning message is generated by JTReg as a result of the deep reflection: 

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by NetworkInterfaceRetrievalTests to method java.net.NetworkInterface.isBoundInetAddress(java.net.InetAddress)
WARNING: Please consider reporting this to the maintainers of NetworkInterfaceRetrievalTests
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/c64a2df9dc7d User: aefimov Date: 2019-07-24 12:10:48 +0000
24-07-2019