-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
Only documentation update. So no risk of compatibility issues.
-
Java API
-
SE
Summary
Add @throws NPE to API description of UIManager.setLookAndFeel(String) as it throws NPE if null is passed.
Problem
The javadoc for UIManager.setLookAndFeel does not explicitly mention that if null is passed as className, it will throw a NPE.
Solution
Added @throws NPE tag to the API description. Webrev: http://cr.openjdk.java.net/~pbansal/8153532/webrev.00/
Specification
List of methods whose specification is being changed
/**
* Loads the {@code LookAndFeel} specified by the given class
* name, using the current thread's context class loader, and
* passes it to {@code setLookAndFeel(LookAndFeel)}.
*
* @param className a string specifying the name of the class that implements
* the look and feel
* @throws ClassNotFoundException if the <code>LookAndFeel</code>
* class could not be found
* @throws InstantiationException if a new instance of the class
* couldn't be created
* @throws IllegalAccessException if the class or initializer isn't accessible
* @throws UnsupportedLookAndFeelException if
* <code>lnf.isSupportedLookAndFeel()</code> is false
* @throws ClassCastException if {@code className} does not identify
* a class that extends {@code LookAndFeel}
* @throws NullPointerException if {@code className} is {@code null}
*/
@SuppressWarnings("deprecation")
public static void setLookAndFeel(String className)
- csr of
-
JDK-8153532 Add @throws NPE javadoc to UIManager.setLookAndFeel(String) method description
-
- Resolved
-