[JAVA-4221] Confirm that SocketStreamHelper static initializer is catching right exceptions Created: 03/Jul/21 Updated: 27/Oct/23 Resolved: 14/Jul/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Internal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Unknown |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
According to https://openjdk.java.net/jeps/403, on Java 17 access to jdk.net classes will throw an IllegalAccessError. The static initializer for SocketStreamHelper doesn't catch that exception. Instead it catches IllegalAccessException. We should confirm what exception is actually thrown on Java 17 when running a test program using the driver with --illegal-access=deny. |
| Comments |
| Comment by Jeffrey Yemin [ 14/Jul/21 ] | |||||||
|
It appears that jdk.net is supported even in Java 17, so closing as Works as Designed. | |||||||
| Comment by Jeffrey Yemin [ 12/Jul/21 ] | |||||||
|
I am not currently clear why this is not a runtime exception in Java 17:
|