Summary
-------
Add explicit constructors to some classes in Java Beans APIs which using default constructors.
Problem
-------
Default constructors are not recommended for formal API classes.
Solution
--------
Add the public constructors to the public/non-abstract classes, and protected constructors to the public/abstract classes.
Specification
-------------
src/java.desktop/share/classes/java/beans/Beans.java
public class Beans {
+ /**
+ * Constructs a {@code Beans}.
+ */
+ public Beans() {}
src/java.desktop/share/classes/java/beans/Encoder.java
+ /**
+ * Constructs an {@code Encoder}.
+ */
+ public Encoder() {}
src/java.desktop/share/classes/java/beans/PersistenceDelegate.java
public abstract class PersistenceDelegate {
+ /**
+ * Constructs a {@code PersistenceDelegate}.
+ */
+ protected PersistenceDelegate() {}
src/java.desktop/share/classes/java/beans/PropertyEditorManager.java
public class PropertyEditorManager {
+ /**
+ * Constructs a {@code PropertyEditorManager}.
+ */
+ public PropertyEditorManager() {}
src/java.desktop/share/classes/java/beans/SimpleBeanInfo.java
public class SimpleBeanInfo implements BeanInfo {
+ /**
+ * Constructs a {@code SimpleBeanInfo}.
+ */
+ public SimpleBeanInfo() {}
Link for convenience: http://cr.openjdk.java.net/~serb/8250857/webrev.00