-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
25, 26
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The documentation has examples of Inet6Address.ofLiteral with various named interfaces as scopes. https://docs.oracle.com/en/java/javase/25/docs/api//java.base/java/net/Inet6Address.html#input But, these examples actually just throw exceptions:
$ jshell
| Welcome to JShell -- Version 25.0.1
| For an introduction type: /help intro
jshell> Inet6Address.ofLiteral("fe80::1%en0")
| Exception java.lang.IllegalArgumentException: Invalid IP address literal: fe80::1%en0
| at IPAddressUtil.invalidIpAddressLiteral (IPAddressUtil.java:168)
| at Inet6Address.ofLiteral (Inet6Address.java:536)
| at (#1:1)
jshell> Inet6Address.ofLiteral("[fe80::1%en0]")
| Exception java.lang.IllegalArgumentException: Invalid IP address literal: [fe80::1%en0]
| at IPAddressUtil.invalidIpAddressLiteral (IPAddressUtil.java:168)
| at Inet6Address.ofLiteral (Inet6Address.java:536)
| at (#2:1)
The documentation has examples of Inet6Address.ofLiteral with various named interfaces as scopes. https://docs.oracle.com/en/java/javase/25/docs/api//java.base/java/net/Inet6Address.html#input But, these examples actually just throw exceptions:
$ jshell
| Welcome to JShell -- Version 25.0.1
| For an introduction type: /help intro
jshell> Inet6Address.ofLiteral("fe80::1%en0")
| Exception java.lang.IllegalArgumentException: Invalid IP address literal: fe80::1%en0
| at IPAddressUtil.invalidIpAddressLiteral (IPAddressUtil.java:168)
| at Inet6Address.ofLiteral (Inet6Address.java:536)
| at (#1:1)
jshell> Inet6Address.ofLiteral("[fe80::1%en0]")
| Exception java.lang.IllegalArgumentException: Invalid IP address literal: [fe80::1%en0]
| at IPAddressUtil.invalidIpAddressLiteral (IPAddressUtil.java:168)
| at Inet6Address.ofLiteral (Inet6Address.java:536)
| at (#2:1)