Summary
The specification of java.net.IDN
class will be updated to state that the methods of that class will throw a java.lang.NullPointerException
if any of the arguments to the methods is null
.
Problem
All the methods on (the final
class) java.net.IDN
currently throw a NullPointerException
if any argument to the methods is null
. However, this isn't specified in any of the methods.
Solution
The class level javadoc of IDN
will be updated to specify that the methods will throw a NullPointerException
if any argument is null
.
Specification
diff --git a/src/java.base/share/classes/java/net/IDN.java b/src/java.base/share/classes/java/net/IDN.java
index 6f11643264f8c..0aaac84076607 100644
--- a/src/java.base/share/classes/java/net/IDN.java
+++ b/src/java.base/share/classes/java/net/IDN.java
@@ -66,6 +66,9 @@
* Applications are responsible for taking adequate security measures when using
* international domain names.
*
+ * <p>Unless otherwise specified, passing a {@code null} argument to any method
+ * in this class will cause a {@link NullPointerException} to be thrown.
+ *
...
public final class IDN {
- csr of
-
JDK-7038838 Unspecified NPE in java.net.IDN methods
-
- Resolved
-