Community
Participate
Working Groups
Currently, clients can create a new instance of the class EditorUtility or use the shared instance called DEFAULT, which is a public static final field in EditorUtility. The problem with the DEFAULT field is that the EditorUtility is not a final class and may be subclassed by clients. For example, we could create a Java-specific extension: public class JavaEditorUtility extends EditorUtility { public static final EditorUtility INSTANCE = new JavaEditorUtility(); ... } In this case, the class JavaEditorUtility would expose two public static final fields INSTANCE and DEFAULT of the type EditorUtility, which could be confusing for clients: JavaEditorUtility.INSTANCE // an instance of JavaEditorUtility JavaEditorUtility.DEFAULT // NOT an instance of JavaEditorUtility A better alternative might be to introduce a separate class, DefaultEditorUtility, which would provide the default instance of the editor utility, and to remove the DEFAULT field from the EditorUtility. Note that this is a breaking change.
Pushed to master: http://git.eclipse.org/c/handly/org.eclipse.handly.git/commit/?id=9f87ec119774d5cd72400eda33e38f3af993682a Breaking changes: * EditorUtility.DEFAULT has been replaced with DefaultEditorUtility.INSTANCE * EditorUtility constructor is now protected (was public) to prevent direct instantiation by clients