diff --git a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/VerticalGridLayout.java b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/VerticalGridLayout.java index 7f8b205d9a0f..6451c17ca28f 100644 --- a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/VerticalGridLayout.java +++ b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/VerticalGridLayout.java @@ -49,7 +49,7 @@ public VerticalGridLayout() { private final int screenHeight; - final private Set components = new LinkedHashSet(); + private final Set components = new LinkedHashSet(); @Override public void addLayoutComponent(Component comp, Object constraints) { diff --git a/java/ant.grammar/src/org/netbeans/modules/ant/grammar/AntGrammar.java b/java/ant.grammar/src/org/netbeans/modules/ant/grammar/AntGrammar.java index 51c889d142b1..de9eaaf1050d 100644 --- a/java/ant.grammar/src/org/netbeans/modules/ant/grammar/AntGrammar.java +++ b/java/ant.grammar/src/org/netbeans/modules/ant/grammar/AntGrammar.java @@ -791,7 +791,7 @@ private static String deletedEscapedShells(String text) { // Result classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - private static abstract class AbstractResultNode extends AbstractNode implements GrammarResult { + private abstract static class AbstractResultNode extends AbstractNode implements GrammarResult { public @Override Icon getIcon(int kind) { return null; diff --git a/java/api.java/src/org/netbeans/spi/java/queries/CompilerOptionsQueryImplementation.java b/java/api.java/src/org/netbeans/spi/java/queries/CompilerOptionsQueryImplementation.java index a762be1b8e6f..bc35eec9cda7 100644 --- a/java/api.java/src/org/netbeans/spi/java/queries/CompilerOptionsQueryImplementation.java +++ b/java/api.java/src/org/netbeans/spi/java/queries/CompilerOptionsQueryImplementation.java @@ -46,7 +46,7 @@ public interface CompilerOptionsQueryImplementation { * Result of finding compiler options, encapsulating the answer as well as the * ability to listen to it. */ - public static abstract class Result { + public abstract static class Result { /** * Gets the explicit compiler options. * @return the list of the compiler options diff --git a/java/beans/src/org/netbeans/modules/beans/PatternAnalyser.java b/java/beans/src/org/netbeans/modules/beans/PatternAnalyser.java index 9cb2abee2b3a..a6bc4c622ef7 100644 --- a/java/beans/src/org/netbeans/modules/beans/PatternAnalyser.java +++ b/java/beans/src/org/netbeans/modules/beans/PatternAnalyser.java @@ -78,7 +78,7 @@ public final class PatternAnalyser { /** deep introspection analyzes also super classes; useful for bean info*/ private boolean deepIntrospection = false; - final static Logger LOG = Logger.getLogger(PatternAnalyser.class.getName()); + static final Logger LOG = Logger.getLogger(PatternAnalyser.class.getName()); public PatternAnalyser( FileObject fileObject, BeanPanelUI ui ) { this(fileObject, ui, false); diff --git a/java/classfile/src/org/netbeans/modules/classfile/CPName.java b/java/classfile/src/org/netbeans/modules/classfile/CPName.java index b4a6c79e9a1f..43ce5ee6ff0f 100644 --- a/java/classfile/src/org/netbeans/modules/classfile/CPName.java +++ b/java/classfile/src/org/netbeans/modules/classfile/CPName.java @@ -29,7 +29,7 @@ */ abstract class CPName extends CPEntry { - final static int INVALID_INDEX = -1; + static final int INVALID_INDEX = -1; int index; private String name; diff --git a/java/classfile/src/org/netbeans/modules/classfile/ClassName.java b/java/classfile/src/org/netbeans/modules/classfile/ClassName.java index 8848552770c0..fce095015566 100644 --- a/java/classfile/src/org/netbeans/modules/classfile/ClassName.java +++ b/java/classfile/src/org/netbeans/modules/classfile/ClassName.java @@ -43,11 +43,11 @@ public final class ClassName implements Comparable, Comparator> cache = + private static final WeakHashMap> cache = new WeakHashMap>(); /** diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/DBElement.java b/java/dbschema/src/org/netbeans/modules/dbschema/DBElement.java index bd825f4ca5bc..413830345c3c 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/DBElement.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/DBElement.java @@ -203,7 +203,7 @@ public interface Impl { /** Default implementation of the Impl interface. * It just holds the property values. */ - static abstract class Memory implements DBElement.Impl { + abstract static class Memory implements DBElement.Impl { /** the element for this implementation */ protected DBElement _element; diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/DBIdentifier.java b/java/dbschema/src/org/netbeans/modules/dbschema/DBIdentifier.java index 8fdd100d1ea2..53c8949e0645 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/DBIdentifier.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/DBIdentifier.java @@ -24,7 +24,7 @@ */ public final class DBIdentifier { private String name; - transient private String fullName = null; + private transient String fullName = null; /** Default constructor */ diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/DBschemaDataObject.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/DBschemaDataObject.java index 577e0e0c03cd..6bd6d442bd43 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/DBschemaDataObject.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/DBschemaDataObject.java @@ -45,7 +45,7 @@ ) public class DBschemaDataObject extends MultiDataObject { - transient protected SchemaElement schemaElement; + protected transient SchemaElement schemaElement; transient SchemaElementImpl schemaElementImpl; public DBschemaDataObject (FileObject pf, DBschemaDataLoader loader) throws DataObjectExistsException { diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java index d4a7a93ed97d..44acf6910e9d 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java @@ -33,7 +33,7 @@ public class TableElementImpl extends DBElementImpl implements TableElement.Impl private DBElementsCollection columns; private DBElementsCollection indexes; private DBElementsCollection keys; - transient private DBElementsCollection columnPairs; + private transient DBElementsCollection columnPairs; private String table; diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java index 0a2b1577d1cd..8c641a103d46 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaConnectionWizardPanel.java @@ -22,7 +22,7 @@ import java.awt.Component; import org.openide.util.HelpCtx; -final public class DBSchemaConnectionWizardPanel extends DBSchemaPanel { +public final class DBSchemaConnectionWizardPanel extends DBSchemaPanel { /** aggregation, instance of UI component of this wizard panel */ private DBSchemaConnectionPanel panelUI; diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java index 5777ef590bdb..4c5f11ff26f7 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/wizard/DBSchemaTablesPanel.java @@ -709,7 +709,7 @@ public void fireChange (Object source) { } } - private static abstract class Handler { + private abstract static class Handler { public abstract void handle(Parameters params); diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/migration/archiver/MapClassName.java b/java/dbschema/src/org/netbeans/modules/dbschema/migration/archiver/MapClassName.java index e9cd93ce7929..826cef4e0e92 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/migration/archiver/MapClassName.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/migration/archiver/MapClassName.java @@ -27,7 +27,7 @@ public class MapClassName { static String LEGACYPREFIX= "com.sun.forte4j.modules.dbmodel."; static String CURRENTPREFIX= "org.netbeans.modules.dbschema."; - static public String getClassNameToken(String realClassName){ + public static String getClassNameToken(String realClassName){ if (realClassName.startsWith(CURRENTPREFIX)){ realClassName = LEGACYPREFIX + realClassName.substring(CURRENTPREFIX.length(),realClassName.length()); } @@ -35,7 +35,7 @@ static public String getClassNameToken(String realClassName){ return realClassName; } - static public String getRealClassName(String token){ + public static String getRealClassName(String token){ if (token.startsWith(LEGACYPREFIX)){ token = CURRENTPREFIX + token.substring(LEGACYPREFIX.length(),token.length()); } diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/util/SQLTypeUtil.java b/java/dbschema/src/org/netbeans/modules/dbschema/util/SQLTypeUtil.java index ad6874d0cad8..08f8f3c7d2dc 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/util/SQLTypeUtil.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/util/SQLTypeUtil.java @@ -43,7 +43,7 @@ public static String getString(String key) { * @param sqlType the type number from java.sql.Types * @return the type name */ - static public String getSqlTypeString(int sqlType) { + public static String getSqlTypeString(int sqlType) { switch (sqlType) { case Types.BIGINT: return "BIGINT"; //NOI18N @@ -121,7 +121,7 @@ static public String getSqlTypeString(int sqlType) { * @param type the type from java.sql.Types * @return true if the given type is numeric type; false otherwise */ - static public boolean isNumeric(int type) { + public static boolean isNumeric(int type) { switch (type) { case Types.BIGINT: case Types.BIT: @@ -145,7 +145,7 @@ static public boolean isNumeric(int type) { * @param type the type from java.sql.Types * @return true if the given type is character type; false otherwise */ - static public boolean isCharacter(int type) { + public static boolean isCharacter(int type) { switch (type) { case Types.BINARY: case Types.CHAR: @@ -168,7 +168,7 @@ static public boolean isCharacter(int type) { * @param type the type from java.sql.Types return true if the give type is * blob type; false otherwise */ - static public boolean isBlob(int type) { + public static boolean isBlob(int type) { switch (type) { case Types.BLOB: case Types.CLOB: @@ -193,7 +193,7 @@ static public boolean isBlob(int type) { * @param type the type from java.sql.Types return true if the give type is * lob type; false otherwise */ - static public boolean isLob(int type) { + public static boolean isLob(int type) { return (isBlob(type) || (Types.CLOB == type) || (Types.LONGVARCHAR == type)); @@ -206,7 +206,7 @@ static public boolean isLob(int type) { * @param type2 second type to compare * @return true if the types are compatible; false otherwise */ - static public boolean isCompatibleType(int type1, int type2) { + public static boolean isCompatibleType(int type1, int type2) { return ((type1 == type2) || (isCharacter(type1) && isCharacter(type2)) || (isNumeric(type1) && isNumeric(type2)) diff --git a/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ConstantPool.java b/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ConstantPool.java index 646e47e312ed..e9d9b1b3df85 100644 --- a/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ConstantPool.java +++ b/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ConstantPool.java @@ -175,7 +175,7 @@ public static ConstantPool parse(byte[] bytes, String description) { // Entries inner classes - public static abstract class Entry { + public abstract static class Entry { private final byte tag; diff --git a/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextSupport.java b/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextSupport.java index fbdb8e535e89..4d3348875cca 100644 --- a/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextSupport.java +++ b/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextSupport.java @@ -1441,7 +1441,7 @@ public static R interpretOrCompileCode(final Expression expression } - private static abstract class ScanRunnable implements Runnable { + private abstract static class ScanRunnable implements Runnable { private Future[] resultPtr; private E[] excPtr; diff --git a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/frames/models/DebuggingTruffleActionsProvider.java b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/frames/models/DebuggingTruffleActionsProvider.java index b98231078dfc..68d28d81ccd4 100644 --- a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/frames/models/DebuggingTruffleActionsProvider.java +++ b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/frames/models/DebuggingTruffleActionsProvider.java @@ -383,7 +383,7 @@ public void run() { ); } - static abstract class LazyActionPerformer implements Models.ActionPerformer { + abstract static class LazyActionPerformer implements Models.ActionPerformer { private final RequestProcessor rp; diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JavaUtils.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JavaUtils.java index ae4031f83590..3055db6c9252 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JavaUtils.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/JavaUtils.java @@ -151,7 +151,7 @@ public Void get(long timeout, TimeUnit unit) throws InterruptedException, Execut }; } - private static abstract class ScanRunnable implements Runnable { + private abstract static class ScanRunnable implements Runnable { private Future[] resultPtr; private E[] excPtr; diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingActionsProvider.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingActionsProvider.java index 484cbf8d6589..ca92a31a7a9a 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingActionsProvider.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingActionsProvider.java @@ -222,7 +222,7 @@ public void run() { ); } - static abstract class LazyActionPerformer implements Models.ActionPerformer { + abstract static class LazyActionPerformer implements Models.ActionPerformer { private RequestProcessor rp; diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingNodeModel.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingNodeModel.java index ad9cc496e4cd..1420fa3379f2 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingNodeModel.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/DebuggingNodeModel.java @@ -1017,7 +1017,7 @@ public void propertyChange(PropertyChangeEvent evt) { } - private final static class ListenerDetaching { + private static final class ListenerDetaching { private String propertyName; private Session session; @@ -1032,7 +1032,7 @@ public void removePropertyChangeListener(PropertyChangeListener l) { } } - private final static class FrameUIInfo { + private static final class FrameUIInfo { String sourcePath; String className; String url; diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesSwitchViewAction.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesSwitchViewAction.java index 8c5b235abf58..ff0248b8a02d 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesSwitchViewAction.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesSwitchViewAction.java @@ -108,7 +108,7 @@ private static synchronized SwitchViewAction getSwitchViewAction(String viewId) return a; } - private final static class SwitchViewAction extends AbstractAction implements Presenter.Popup { + private static final class SwitchViewAction extends AbstractAction implements Presenter.Popup { private String id; private String treeNodeFormat; diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesTreeModelFilterSI.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesTreeModelFilterSI.java index 5cb8caab0f3e..e28b37bb9655 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesTreeModelFilterSI.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesTreeModelFilterSI.java @@ -352,7 +352,7 @@ String getIconBase() { } } - private static abstract class SpecialNode { + private abstract static class SpecialNode { protected ObjectVariable object; protected SpecialNode(ObjectVariable parent) { diff --git a/java/debugger.jpda.visual/remotesrc/org/netbeans/modules/debugger/jpda/visual/remote/RemoteAWTService.java b/java/debugger.jpda.visual/remotesrc/org/netbeans/modules/debugger/jpda/visual/remote/RemoteAWTService.java index da67cc0ea87f..aa8df65a7afa 100644 --- a/java/debugger.jpda.visual/remotesrc/org/netbeans/modules/debugger/jpda/visual/remote/RemoteAWTService.java +++ b/java/debugger.jpda.visual/remotesrc/org/netbeans/modules/debugger/jpda/visual/remote/RemoteAWTService.java @@ -396,8 +396,8 @@ private String createComponentsAddAt(Component[] components) { private static class ComponentInfo { - private final static int INT_DATA_LENGTH = 8; - private final static ComponentInfo[] NO_SUBCOMPONENTS = new ComponentInfo[] {}; + private static final int INT_DATA_LENGTH = 8; + private static final ComponentInfo[] NO_SUBCOMPONENTS = new ComponentInfo[] {}; private Component c; private String name; diff --git a/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/JavaComponentInfo.java b/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/JavaComponentInfo.java index 16a166329b35..0f79e5145634 100644 --- a/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/JavaComponentInfo.java +++ b/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/JavaComponentInfo.java @@ -82,7 +82,7 @@ * * @author Jaroslav Bachorik */ -abstract public class JavaComponentInfo implements ComponentInfo { +public abstract class JavaComponentInfo implements ComponentInfo { private static final JavaComponentInfo[] NO_SUBCOMPONENTS = new JavaComponentInfo[]{}; private static final int MAX_TEXT_LENGTH = 80; @@ -119,7 +119,7 @@ public JavaComponentInfo(JPDAThreadImpl t, ObjectReference component, RemoteServ this.uid = component.uniqueID(); } - final protected void init() throws RetrievalException { + protected final void init() throws RetrievalException { retrieve(); addProperties(); if (!RemoteAWTScreenshot.FAST_FIELDS_SEARCH) { @@ -127,13 +127,13 @@ final protected void init() throws RetrievalException { } } - abstract protected void retrieve() throws RetrievalException; + protected abstract void retrieve() throws RetrievalException; - final public JPDAThreadImpl getThread() { + public final JPDAThreadImpl getThread() { return thread; } - final public ObjectReference getComponent() { + public final ObjectReference getComponent() { return component; } @@ -142,11 +142,11 @@ public Stack getAddCallStack() { return VisualDebuggerListener.getStackOf(thread.getDebugger(), component); } - final public String getName() { + public final String getName() { return name; } - final public String getTypeName() { + public final String getTypeName() { int d = type.lastIndexOf('.'); String typeName; if (d > 0) { @@ -157,7 +157,7 @@ final public String getTypeName() { return typeName; } - final public void setComponentText(String componentText) { + public final void setComponentText(String componentText) { if (componentText.length() > MAX_TEXT_LENGTH) { this.componentText = componentText.substring(0, MAX_TEXT_LENGTH) + "..."; } else { @@ -197,15 +197,15 @@ protected String getFieldName() { return (fieldInfo != null) ? fieldInfo.getName() + " " : ""; } - final public String getType() { + public final String getType() { return type; } - final public FieldInfo getField() { + public final FieldInfo getField() { return fieldInfo; } - final public boolean isCustomType() { + public final boolean isCustomType() { return isCustomType(type); } @@ -217,12 +217,12 @@ public static boolean isCustomType(String type) { } @Override - final public Rectangle getBounds() { + public final Rectangle getBounds() { return bounds; } @Override - final public Rectangle getWindowBounds() { + public final Rectangle getWindowBounds() { if (windowBounds == null) { return bounds; } else { @@ -230,21 +230,21 @@ final public Rectangle getWindowBounds() { } } - final public void addPropertySet(PropertySet ps) { + public final void addPropertySet(PropertySet ps) { propertySets.add(ps); } @Override - final public PropertySet[] getPropertySets() { + public final PropertySet[] getPropertySets() { return propertySets.toArray(new PropertySet[]{}); } - final protected void setSubComponents(JavaComponentInfo[] subComponents) { + protected final void setSubComponents(JavaComponentInfo[] subComponents) { this.subComponents = subComponents; } @Override - final public JavaComponentInfo[] getSubComponents() { + public final JavaComponentInfo[] getSubComponents() { if (subComponents == null) { return NO_SUBCOMPONENTS; } else { @@ -253,44 +253,44 @@ final public JavaComponentInfo[] getSubComponents() { } @Override - final public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) { + public final void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) { pchs.addPropertyChangeListener(propertyChangeListener); } @Override - final public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) { + public final void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) { pchs.removePropertyChangeListener(propertyChangeListener); } - final protected void firePropertyChange(String name, Object o, Object n) { + protected final void firePropertyChange(String name, Object o, Object n) { pchs.firePropertyChange(name, o, n); } - final public void setFieldInfo(FieldInfo fieldInfo) { + public final void setFieldInfo(FieldInfo fieldInfo) { this.fieldInfo = fieldInfo; } - final public void setBounds(Rectangle r) { + public final void setBounds(Rectangle r) { this.bounds = r; } - final public void setWindowBounds(Rectangle rectangle) { + public final void setWindowBounds(Rectangle rectangle) { this.windowBounds = rectangle; } - final public void setName(String value) { + public final void setName(String value) { this.name = value; } - final public void setComponent(ObjectReference component) { + public final void setComponent(ObjectReference component) { this.component = component; } - final public void setType(String name) { + public final void setType(String name) { this.type = name; } diff --git a/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/BaseComponentBreakpointImpl.java b/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/BaseComponentBreakpointImpl.java index 28d2837534e5..3eab4d0f9d47 100644 --- a/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/BaseComponentBreakpointImpl.java +++ b/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/BaseComponentBreakpointImpl.java @@ -38,7 +38,7 @@ * * @author jbachorik */ -abstract public class BaseComponentBreakpointImpl extends ComponentBreakpointImpl implements PropertyChangeListener { +public abstract class BaseComponentBreakpointImpl extends ComponentBreakpointImpl implements PropertyChangeListener { protected ComponentBreakpoint cb; protected JPDADebugger debugger; @@ -49,9 +49,9 @@ public BaseComponentBreakpointImpl(ComponentBreakpoint cb, JPDADebugger debugger cb.addPropertyChangeListener(this); } - abstract protected void initServiceBreakpoints(); + protected abstract void initServiceBreakpoints(); - final protected void addMethodBreakpoint(MethodBreakpoint mb, ObjectVariable variableComponent) { + protected final void addMethodBreakpoint(MethodBreakpoint mb, ObjectVariable variableComponent) { mb.setHidden(true); mb.setInstanceFilters(debugger, new ObjectVariable[] { variableComponent }); mb.addJPDABreakpointListener(new JPDABreakpointListener() { @@ -64,7 +64,7 @@ public void breakpointReached(JPDABreakpointEvent event) { serviceBreakpoints.add(mb); } - final protected void navigateToCustomCode(final JPDAThread thread) { + protected final void navigateToCustomCode(final JPDAThread thread) { CallStackFrame callStackFrame = null; try { CallStackFrame[] callStack = thread.getCallStack(); diff --git a/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/ComponentBreakpoint.java b/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/ComponentBreakpoint.java index 3940ba53a222..ecdcdf0f00ab 100644 --- a/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/ComponentBreakpoint.java +++ b/java/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/breakpoints/ComponentBreakpoint.java @@ -33,7 +33,7 @@ * @author Martin Entlicher * @author Jaroslav Bachorik */ -abstract public class ComponentBreakpoint extends Breakpoint { +public abstract class ComponentBreakpoint extends Breakpoint { public static final int TYPE_ADD = 1; public static final int TYPE_REMOVE = 2; public static final int TYPE_SHOW = 4; @@ -82,7 +82,7 @@ public void setType(int type) { firePropertyChange(PROP_TYPE, oldType, type); } - abstract public int supportedTypes(); + public abstract int supportedTypes(); /*private void notifyRemoved() { DebuggerManager.getDebuggerManager().removeDebuggerListener(serviceBreakpointListenerWeak); diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/DebuggerConsoleIO.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/DebuggerConsoleIO.java index e5d92371a924..3e6191179b9f 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/DebuggerConsoleIO.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/DebuggerConsoleIO.java @@ -54,7 +54,7 @@ public void println(String text, Line line, boolean important) { output.getIOManager().println(text, line, important); } - public final static class Line { + public static final class Line { private final String url; private final int lineNumber; diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java index c9c6b3afb162..eac1a1d760f9 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/breakpoints/BreakpointImpl.java @@ -301,7 +301,7 @@ synchronized void addEventRequest (EventRequest r, boolean ignoreHitCount) throw } } - synchronized protected void removeAllEventRequests () { + protected synchronized void removeAllEventRequests () { if (requests.isEmpty()) return; VirtualMachine vm = getDebugger().getVirtualMachine(); if (vm == null) return; @@ -324,7 +324,7 @@ synchronized protected void removeAllEventRequests () { requests = new LinkedList(); } - synchronized private void removeEventRequest(EventRequest r) { + private synchronized void removeEventRequest(EventRequest r) { VirtualMachine vm = getDebugger().getVirtualMachine(); if (vm == null) return; try { diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluationContext.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluationContext.java index 7bd8701d828d..12952082a79d 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluationContext.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluationContext.java @@ -374,7 +374,7 @@ public void setValue(Mirror value) { } - public static abstract class VariableInfo { + public abstract static class VariableInfo { public abstract void setValue(Value value) throws IllegalStateException; diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java index 251a458b3ff6..c4c6d2e40072 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java @@ -4624,7 +4624,7 @@ private static final class UnsuitableArgumentsException extends Exception { public UnsuitableArgumentsException() {} } - static abstract class ArtificialMirror implements Mirror { + abstract static class ArtificialMirror implements Mirror { @Override public VirtualMachine virtualMachine() { @@ -4635,7 +4635,7 @@ public VirtualMachine virtualMachine() { } - private static abstract class CommandMirror extends ArtificialMirror { + private abstract static class CommandMirror extends ArtificialMirror { } diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/CallStackFrameImpl.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/CallStackFrameImpl.java index e9bd854b94da..608c08e89b40 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/CallStackFrameImpl.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/CallStackFrameImpl.java @@ -1012,7 +1012,7 @@ public List getOwnedMonitors() { return Collections.unmodifiableList(frameMonitors); } - private final static class EqualsInfo { + private static final class EqualsInfo { private JPDAThread thread; private int depth; diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java index f616e142a4f3..dbbbd7a7649c 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java @@ -143,7 +143,7 @@ private static Object createMirrorObject(Value value, Map mirrors return null; } - static private Object createPristineInstanceOf(Class clazz) { + private static Object createPristineInstanceOf(Class clazz) { try { //return clazz.newInstance(); - not sufficient Constructor constructor; @@ -185,7 +185,7 @@ private static java.lang.reflect.Field getDeclaredOrInheritedField(Class clazz, } } - static private Object createMirrorObject(ObjectReference value, ReferenceType type, + private static Object createMirrorObject(ObjectReference value, ReferenceType type, Class clazz, Map mirrorsMap) throws ClassNotPreparedExceptionWrapper, InternalExceptionWrapper, diff --git a/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/JPDAClassTypeTestApp.java b/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/JPDAClassTypeTestApp.java index d2d8c6da2aba..2f045a9b5b11 100644 --- a/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/JPDAClassTypeTestApp.java +++ b/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/JPDAClassTypeTestApp.java @@ -53,7 +53,7 @@ private static int testClasses(Object o1, Object o2) { static class MultiImpl extends SuperImpl implements Runnable, Intrfc1, Intrfc2 { - private final static Class multiIntrfc = getPreparedInterface(); + private static final Class multiIntrfc = getPreparedInterface(); public static Class getPreparedInterface() { new Intrfc6() { @@ -71,7 +71,7 @@ public void run() { } } - private static abstract class SuperImpl implements Intrfc2, Intrfc3, Intrfc4 { + private abstract static class SuperImpl implements Intrfc2, Intrfc3, Intrfc4 { public SuperImpl() { } diff --git a/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/MethodBreakpointApp.java b/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/MethodBreakpointApp.java index f2f3c5b09597..faee1740a116 100644 --- a/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/MethodBreakpointApp.java +++ b/java/debugger.jpda/test/unit/src/org/netbeans/api/debugger/jpda/testapps/MethodBreakpointApp.java @@ -99,7 +99,7 @@ public int getW() { } } - private static abstract class AbstractInner { + private abstract static class AbstractInner { public abstract double compute(); diff --git a/java/form/src/org/netbeans/modules/form/ComponentInspector.java b/java/form/src/org/netbeans/modules/form/ComponentInspector.java index ad6b7c019ca6..bb6f83a1beff 100644 --- a/java/form/src/org/netbeans/modules/form/ComponentInspector.java +++ b/java/form/src/org/netbeans/modules/form/ComponentInspector.java @@ -621,7 +621,7 @@ private Transferable doPaste() throws java.io.IOException { // } // } - final public static class ResolvableHelper implements java.io.Serializable { + public static final class ResolvableHelper implements java.io.Serializable { static final long serialVersionUID = 7424646018839457544L; public Object readResolve() { return new TopComponent() { diff --git a/java/form/src/org/netbeans/modules/form/FormDataObject.java b/java/form/src/org/netbeans/modules/form/FormDataObject.java index 75ecd10a19f1..a9a529b1c238 100644 --- a/java/form/src/org/netbeans/modules/form/FormDataObject.java +++ b/java/form/src/org/netbeans/modules/form/FormDataObject.java @@ -40,8 +40,8 @@ * @author Ian Formanek, Petr Hamernik */ public class FormDataObject extends MultiDataObject { - transient private EditorSupport formEditor; - transient private OpenEdit openEdit; + private transient EditorSupport formEditor; + private transient OpenEdit openEdit; /** The entry for the .form file */ FileEntry formEntry; diff --git a/java/form/src/org/netbeans/modules/form/FormModel.java b/java/form/src/org/netbeans/modules/form/FormModel.java index e3986cb80ee2..f992bb0e8ed3 100644 --- a/java/form/src/org/netbeans/modules/form/FormModel.java +++ b/java/form/src/org/netbeans/modules/form/FormModel.java @@ -57,7 +57,7 @@ public enum FormVersion { NB71, // since NB 7.1, form file version 1.8 NB74 // since NB 7.4, form file version 1.9 } - final static FormVersion LATEST_VERSION = FormVersion.NB74; + static final FormVersion LATEST_VERSION = FormVersion.NB74; private String leadingComment; @@ -1396,9 +1396,9 @@ public int getIndexOf(RADComponent comp) { // --------------- /** For debugging purposes only. */ - static private int traceCount = 0; + private static int traceCount = 0; /** For debugging purposes only. */ - static private final boolean TRACE = false; + private static final boolean TRACE = false; /** For debugging purposes only. */ static void t(String str) { if (TRACE) diff --git a/java/form/src/org/netbeans/modules/form/FormPropertyContext.java b/java/form/src/org/netbeans/modules/form/FormPropertyContext.java index 00fafe4ac393..f5c3eee6e034 100644 --- a/java/form/src/org/netbeans/modules/form/FormPropertyContext.java +++ b/java/form/src/org/netbeans/modules/form/FormPropertyContext.java @@ -160,6 +160,6 @@ public static EmptyImpl getInstance() { return theInstance; } - static private EmptyImpl theInstance = null; + private static EmptyImpl theInstance = null; } } diff --git a/java/form/src/org/netbeans/modules/form/FormPropertyEditorManager.java b/java/form/src/org/netbeans/modules/form/FormPropertyEditorManager.java index b96140ed599b..89cebb35da99 100644 --- a/java/form/src/org/netbeans/modules/form/FormPropertyEditorManager.java +++ b/java/form/src/org/netbeans/modules/form/FormPropertyEditorManager.java @@ -38,7 +38,7 @@ * * @author Ian Formanek, Tomas Pavek */ -final public class FormPropertyEditorManager { +public final class FormPropertyEditorManager { /** * Maps property type to property editor class. There are 2 maps - one for diff --git a/java/form/src/org/netbeans/modules/form/FormUtils.java b/java/form/src/org/netbeans/modules/form/FormUtils.java index 74c14d66438c..9c09478d9e2f 100644 --- a/java/form/src/org/netbeans/modules/form/FormUtils.java +++ b/java/form/src/org/netbeans/modules/form/FormUtils.java @@ -1373,7 +1373,7 @@ static boolean isMarkedChildrenDependentProperty(Node.Property prop) { // ----- - private static abstract class DefaultValueDeviation { + private abstract static class DefaultValueDeviation { protected Object[] values; DefaultValueDeviation(Object[] values) { this.values = values; diff --git a/java/form/src/org/netbeans/modules/form/JavaCodeGenerator.java b/java/form/src/org/netbeans/modules/form/JavaCodeGenerator.java index 7e422e8269b4..29296e094aca 100644 --- a/java/form/src/org/netbeans/modules/form/JavaCodeGenerator.java +++ b/java/form/src/org/netbeans/modules/form/JavaCodeGenerator.java @@ -4078,7 +4078,7 @@ protected Object replaceObject(Object obj) throws IOException { // {{{ CodeGenerateEditor // - final public static class CodeGenerateEditor extends PropertyEditorSupport + public static final class CodeGenerateEditor extends PropertyEditorSupport { private RADComponent component; @@ -4582,7 +4582,7 @@ public boolean canWrite() { } - public final static class LayoutCodeTargetEditor + public static final class LayoutCodeTargetEditor extends org.netbeans.modules.form.editors.EnumEditor { public LayoutCodeTargetEditor() { @@ -4613,7 +4613,7 @@ public LayoutCodeTargetEditor(boolean specific) { } } - public final static class ListenerGenerationStyleEditor + public static final class ListenerGenerationStyleEditor extends org.netbeans.modules.form.editors.EnumEditor { public ListenerGenerationStyleEditor() { diff --git a/java/form/src/org/netbeans/modules/form/RADComponentNode.java b/java/form/src/org/netbeans/modules/form/RADComponentNode.java index d5bce2f8c118..c41984800dd5 100644 --- a/java/form/src/org/netbeans/modules/form/RADComponentNode.java +++ b/java/form/src/org/netbeans/modules/form/RADComponentNode.java @@ -50,10 +50,10 @@ public class RADComponentNode extends FormNode implements RADComponentCookie, FormPropertyCookie { - private final static MessageFormat nodeNameFormat = + private static final MessageFormat nodeNameFormat = new MessageFormat( FormUtils.getBundleString("FMT_ComponentNodeName")); // NOI18N - private final static MessageFormat nodeNoNameFormat = + private static final MessageFormat nodeNoNameFormat = new MessageFormat( FormUtils.getBundleString("FMT_UnnamedComponentNodeName")); // NOI18N diff --git a/java/form/src/org/netbeans/modules/form/RADConnectionPropertyEditor.java b/java/form/src/org/netbeans/modules/form/RADConnectionPropertyEditor.java index 77b1906632d7..f5288809109b 100644 --- a/java/form/src/org/netbeans/modules/form/RADConnectionPropertyEditor.java +++ b/java/form/src/org/netbeans/modules/form/RADConnectionPropertyEditor.java @@ -280,11 +280,11 @@ else if (realValue != null) { // implementation class for FormDesignValue public static class RADConnectionDesignValue implements FormDesignValue { //, java.io.Serializable { - public final static int TYPE_PROPERTY = 0; - public final static int TYPE_METHOD = 1; - public final static int TYPE_CODE = 2; - public final static int TYPE_VALUE = 3; - public final static int TYPE_BEAN = 4; + public static final int TYPE_PROPERTY = 0; + public static final int TYPE_METHOD = 1; + public static final int TYPE_CODE = 2; + public static final int TYPE_VALUE = 3; + public static final int TYPE_BEAN = 4; /** Determines the type of connection design value */ int type; @@ -300,8 +300,8 @@ public static class RADConnectionDesignValue implements FormDesignValue { //, ja String value = null; // used if type = TYPE_VALUE String requiredTypeName = null; // used if type = TYPE_VALUE - transient private boolean needsInit = false; // used for deserialization init if type = TYPE_PROPERTY or TYPE_METHOD or TYPE_BEAN - transient private FormModel formModel; // used for deserialization init if type = TYPE_PROPERTY or TYPE_METHOD or TYPE_BEAN + private transient boolean needsInit = false; // used for deserialization init if type = TYPE_PROPERTY or TYPE_METHOD or TYPE_BEAN + private transient FormModel formModel; // used for deserialization init if type = TYPE_PROPERTY or TYPE_METHOD or TYPE_BEAN static final long serialVersionUID =147134837271021412L; RADConnectionDesignValue(RADComponent comp) { diff --git a/java/form/src/org/netbeans/modules/form/RADVisualFormContainer.java b/java/form/src/org/netbeans/modules/form/RADVisualFormContainer.java index cf3ccc312206..be389ea72676 100644 --- a/java/form/src/org/netbeans/modules/form/RADVisualFormContainer.java +++ b/java/form/src/org/netbeans/modules/form/RADVisualFormContainer.java @@ -539,7 +539,7 @@ private boolean isInternalFrame() { // ------------------------------------------------------------------------------------------ // Innerclasses - final public static class SizePolicyEditor extends java.beans.PropertyEditorSupport { + public static final class SizePolicyEditor extends java.beans.PropertyEditorSupport { /** Display Names for alignment. */ private static final String[] names = { FormUtils.getBundleString("VALUE_sizepolicy_full"), // NOI18N diff --git a/java/form/src/org/netbeans/modules/form/codestructure/CodeStructure.java b/java/form/src/org/netbeans/modules/form/codestructure/CodeStructure.java index 687134db26fa..2991acbef831 100644 --- a/java/form/src/org/netbeans/modules/form/codestructure/CodeStructure.java +++ b/java/form/src/org/netbeans/modules/form/codestructure/CodeStructure.java @@ -1046,9 +1046,9 @@ public void redo() { // --------------- /** For debugging purposes only. */ - static private int traceCount = 0; + private static int traceCount = 0; /** For debugging purposes only. */ - static private final boolean TRACE = false; + private static final boolean TRACE = false; /** For debugging purposes only. */ static void t(String str) { if (TRACE) diff --git a/java/form/src/org/netbeans/modules/form/forminfo/FormInfo.java b/java/form/src/org/netbeans/modules/form/forminfo/FormInfo.java index 0f9ba90210de..6c55a6729d95 100644 --- a/java/form/src/org/netbeans/modules/form/forminfo/FormInfo.java +++ b/java/form/src/org/netbeans/modules/form/forminfo/FormInfo.java @@ -35,7 +35,7 @@ public abstract class FormInfo { /** Constant for empty list of properties */ - public final static Node.Property[] NO_PROPERTIES = new Node.Property[0]; + public static final Node.Property[] NO_PROPERTIES = new Node.Property[0]; /** Used to create the design-time instance of the form object, which is used * only for displaing properties and events of the form. I.e. it is not diff --git a/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagCustomizer.java b/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagCustomizer.java index 29420159d0e8..4526e5bd423f 100644 --- a/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagCustomizer.java +++ b/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagCustomizer.java @@ -36,7 +36,7 @@ * * @author Petr Hrebejk */ -final public class GridBagCustomizer extends JPanel implements Customizer +public final class GridBagCustomizer extends JPanel implements Customizer { /** bundle to obtain text information from */ // private static java.util.ResourceBundle bundle = org.openide.util.NbBundle.getBundle(GridBagCustomizer.class); @@ -1260,7 +1260,7 @@ else if (shift) { public static class Window extends JDialog implements Customizer, ActionListener { - final private GridBagCustomizer customizerPanel; + private final GridBagCustomizer customizerPanel; private boolean packCalled; public Window() { super(org.openide.windows.WindowManager.getDefault().getMainWindow()); diff --git a/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagLayoutSupport.java b/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagLayoutSupport.java index aa64cda6d27d..a194be40f766 100644 --- a/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagLayoutSupport.java +++ b/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagLayoutSupport.java @@ -544,8 +544,8 @@ else if (line == ival) * Comparator of LayoutInfo objects. */ private static class LayoutInfoComparator implements java.util.Comparator{ - final static int XAXIS = 0; - final static int YAXIS = 1; + static final int XAXIS = 0; + static final int YAXIS = 1; int cord; public LayoutInfoComparator(int cord){ diff --git a/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/ScrollPaneSupport.java b/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/ScrollPaneSupport.java index f1fe94a487ad..2ee35795414e 100644 --- a/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/ScrollPaneSupport.java +++ b/java/form/src/org/netbeans/modules/form/layoutsupport/delegates/ScrollPaneSupport.java @@ -155,7 +155,7 @@ public boolean removeComponentFromContainer(Container container, return false; // cannot remove component from JSplitPane } - static private void ensureFakePeerAttached(Component comp) { + private static void ensureFakePeerAttached(Component comp) { FakePeerSupport.attachFakePeer(comp); if (comp instanceof Container) FakePeerSupport.attachFakePeerRecursively((Container)comp); diff --git a/java/form/src/org/netbeans/modules/form/layoutsupport/griddesigner/UndoRedoSupport.java b/java/form/src/org/netbeans/modules/form/layoutsupport/griddesigner/UndoRedoSupport.java index 39d33831c8ed..7b7bc94cb9fb 100644 --- a/java/form/src/org/netbeans/modules/form/layoutsupport/griddesigner/UndoRedoSupport.java +++ b/java/form/src/org/netbeans/modules/form/layoutsupport/griddesigner/UndoRedoSupport.java @@ -111,7 +111,7 @@ public Action getRedoAction() { return redoAction; } - static abstract class DelegateAction extends AbstractAction { + abstract static class DelegateAction extends AbstractAction { protected Action delegate; protected DelegateAction(Action delegate) { diff --git a/java/form/src/org/netbeans/modules/form/project/ClassSource.java b/java/form/src/org/netbeans/modules/form/project/ClassSource.java index e23147b5c2c4..924a2477187e 100644 --- a/java/form/src/org/netbeans/modules/form/project/ClassSource.java +++ b/java/form/src/org/netbeans/modules/form/project/ClassSource.java @@ -107,7 +107,7 @@ public static Entry unpickle(String type, String name) { /** * One logical component of the classpath. */ - public static abstract class Entry { + public abstract static class Entry { /** List of folder URLs (dirs or roots of JARs) making up the classpath. */ public abstract List getClasspath(); /** Tries to add the classpath entries to a project, as with {@link ProjectClassPathModifier}. diff --git a/java/form/test/qa-functional/data/OpenForm/StringArrayCustomEditor.java b/java/form/test/qa-functional/data/OpenForm/StringArrayCustomEditor.java index 4ca63e694082..6a569ca5b0ac 100644 --- a/java/form/test/qa-functional/data/OpenForm/StringArrayCustomEditor.java +++ b/java/form/test/qa-functional/data/OpenForm/StringArrayCustomEditor.java @@ -41,7 +41,7 @@ public class StringArrayCustomEditor extends javax.swing.JPanel { private Vector itemsVector; private StringArrayCustomizable editor; - private final static int DEFAULT_WIDTH = 400; + private static final int DEFAULT_WIDTH = 400; static final long serialVersionUID =-4347656479280614636L; diff --git a/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/AbstractGradleClassPathImpl.java b/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/AbstractGradleClassPathImpl.java index f50e255a88d0..dce286de1d01 100644 --- a/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/AbstractGradleClassPathImpl.java +++ b/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/AbstractGradleClassPathImpl.java @@ -127,7 +127,7 @@ public void removePropertyChangeListener(PropertyChangeListener propertyChangeLi } } - synchronized final void clearResourceCache() { + final synchronized void clearResourceCache() { resources = null; support.firePropertyChange(ClassPathImplementation.PROP_RESOURCES, null, null); } diff --git a/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/GlobalClassPathProviderImpl.java b/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/GlobalClassPathProviderImpl.java index f9628547ab80..99305397d0f2 100644 --- a/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/GlobalClassPathProviderImpl.java +++ b/java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/GlobalClassPathProviderImpl.java @@ -39,10 +39,10 @@ public class GlobalClassPathProviderImpl extends ProjectOpenedHook implements Pr final Project project; - private final static int BOOT = 0; - private final static int SOURCE = 2; - private final static int COMPILE = 4; - private final static int RUNTIME = 6; + private static final int BOOT = 0; + private static final int SOURCE = 2; + private static final int COMPILE = 4; + private static final int RUNTIME = 6; final ClassPath[] cache = new ClassPath[RUNTIME + 2]; diff --git a/java/gradle.java/src/org/netbeans/modules/gradle/java/output/JDPAProcessorFactory.java b/java/gradle.java/src/org/netbeans/modules/gradle/java/output/JDPAProcessorFactory.java index e7e00f903b6f..fbb4762002f8 100644 --- a/java/gradle.java/src/org/netbeans/modules/gradle/java/output/JDPAProcessorFactory.java +++ b/java/gradle.java/src/org/netbeans/modules/gradle/java/output/JDPAProcessorFactory.java @@ -44,7 +44,7 @@ public Set createOutputProcessors(RunConfig cfg) { private static class JDPAOutputProcessor implements OutputProcessor { - private final static Pattern JDPA_LISTEN = Pattern.compile("Listening for transport dt_socket at address: (\\d+)"); + private static final Pattern JDPA_LISTEN = Pattern.compile("Listening for transport dt_socket at address: (\\d+)"); final RunConfig cfg; boolean activated; diff --git a/java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java b/java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java index 97a215c83634..1709b012d4a9 100644 --- a/java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java +++ b/java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java @@ -65,7 +65,7 @@ @ProjectServiceProvider(service = GradleProgressListenerProvider.class, projectType = NbGradleProject.GRADLE_PLUGIN_TYPE + "/java") public final class GradleTestProgressListener implements ProgressListener, GradleProgressListenerProvider { - final private Project project; + private final Project project; TestSession session; Map runningTests = new ConcurrentHashMap<>(); diff --git a/java/i18n/src/org/netbeans/modules/i18n/HelpStringCustomEditor.java b/java/i18n/src/org/netbeans/modules/i18n/HelpStringCustomEditor.java index 24ff9a17be0a..77f2e98ec467 100644 --- a/java/i18n/src/org/netbeans/modules/i18n/HelpStringCustomEditor.java +++ b/java/i18n/src/org/netbeans/modules/i18n/HelpStringCustomEditor.java @@ -220,7 +220,7 @@ public Component getCustomEditor() { } } // End of nested class ReplaceCodeEditor. - private static abstract class StringEditor extends PropertyEditorSupport implements ExPropertyEditor { + private abstract static class StringEditor extends PropertyEditorSupport implements ExPropertyEditor { private static boolean useRaw = Boolean.getBoolean("netbeans.stringEditor.useRawCharacters"); // bugfix# 9219 added editable field and isEditable() "getter" to be used in StringCustomEditor diff --git a/java/i18n/src/org/netbeans/modules/i18n/I18nSupport.java b/java/i18n/src/org/netbeans/modules/i18n/I18nSupport.java index d9479824e0e6..238900b5e3f3 100644 --- a/java/i18n/src/org/netbeans/modules/i18n/I18nSupport.java +++ b/java/i18n/src/org/netbeans/modules/i18n/I18nSupport.java @@ -197,7 +197,7 @@ public interface I18nReplacer { } /** Factory inteface for creating {@code I18nSupport} instances. */ - public static abstract class Factory { + public abstract static class Factory { /** Gets I18nSupport instance for specified data object and document. * @exception IOException when the document could not be loaded */ diff --git a/java/i18n/src/org/netbeans/modules/i18n/SelectorUtils.java b/java/i18n/src/org/netbeans/modules/i18n/SelectorUtils.java index 2fc95e567946..975bb4f6a1e1 100644 --- a/java/i18n/src/org/netbeans/modules/i18n/SelectorUtils.java +++ b/java/i18n/src/org/netbeans/modules/i18n/SelectorUtils.java @@ -105,7 +105,7 @@ public boolean acceptNode(Node n) { * @param prj the project to select from * @return DataObject representing the selected bundle file or null */ - static public DataObject selectBundle(Project prj, FileObject file) { + public static DataObject selectBundle(Project prj, FileObject file) { try { Node root = bundlesNode(prj, file, true); @@ -150,7 +150,7 @@ public boolean acceptNodes(Node[] nodes) { * @param includeFiles specifies whether to show jar files or just folders * @return root Node */ - static public Node bundlesNode(Project prj, FileObject file, boolean includeFiles) { + public static Node bundlesNode(Project prj, FileObject file, boolean includeFiles) { List nodes = new LinkedList(); if (prj == null) { prj = FileOwnerQuery.getOwner(file); @@ -246,7 +246,7 @@ private static SourceGroup getSourceGroup(FileObject file, Project prj) { * @return root Node of source files from prj filtered * by filter **/ - static public Node sourcesNode(Project prj, FilteredNode.NodeFilter filter) { + public static Node sourcesNode(Project prj, FilteredNode.NodeFilter filter) { Sources src = ProjectUtils.getSources(prj); SourceGroup[] srcgrps = src.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA); java.util.List nodes = new ArrayList(); diff --git a/java/i18n/src/org/netbeans/modules/i18n/wizard/I18nWizardDescriptor.java b/java/i18n/src/org/netbeans/modules/i18n/wizard/I18nWizardDescriptor.java index 63c1dda798db..0583e41974ea 100644 --- a/java/i18n/src/org/netbeans/modules/i18n/wizard/I18nWizardDescriptor.java +++ b/java/i18n/src/org/netbeans/modules/i18n/wizard/I18nWizardDescriptor.java @@ -68,7 +68,7 @@ static WizardDescriptor createI18nWizardDescriptor(WizardDescriptor.Iterator { /** Reference to panel. */ @@ -83,7 +83,7 @@ public static abstract class Panel /** Gets component to display. Implements WizardDescriptor.Panel interface method. * @return this instance */ - public synchronized final Component getComponent() { + public final synchronized Component getComponent() { if (component == null) { component = createComponent(); } diff --git a/java/j2ee.core.utilities/src/org/netbeans/modules/j2ee/core/api/support/progress/ProgressSupport.java b/java/j2ee.core.utilities/src/org/netbeans/modules/j2ee/core/api/support/progress/ProgressSupport.java index b12b5dbeef0c..fa59cf9cd9b3 100644 --- a/java/j2ee.core.utilities/src/org/netbeans/modules/j2ee/core/api/support/progress/ProgressSupport.java +++ b/java/j2ee.core.utilities/src/org/netbeans/modules/j2ee/core/api/support/progress/ProgressSupport.java @@ -331,7 +331,7 @@ ProgressPanel getPanel() { * Describes an action. See also {@link EventThreadAction} and * {@link BackgroundAction}. */ - public static abstract class Action { + public abstract static class Action { /** * Constructs a new action, by default {@link #isEnabled enabled}. @@ -404,7 +404,7 @@ protected boolean cancel() { * Describes an event thread action, that is, one that should be run * in the event dispatching thread. */ - public static abstract class EventThreadAction extends Action { + public abstract static class EventThreadAction extends Action { private final boolean cancellable; @@ -430,7 +430,7 @@ protected final boolean isCancellable() { * Describes a background action, that is, one that should be run * in a background thread under a progress dialog. */ - public static abstract class BackgroundAction extends Action { + public abstract static class BackgroundAction extends Action { private final boolean cancellable; diff --git a/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/rename/RelationshipMappingRename.java b/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/rename/RelationshipMappingRename.java index 5e741a98f6c9..b32983f7ae81 100644 --- a/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/rename/RelationshipMappingRename.java +++ b/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/rename/RelationshipMappingRename.java @@ -77,7 +77,7 @@ public final class RelationshipMappingRename extends JavaRefactoringPlugin { private final RenameRefactoring rename; - private final static Logger LOG = Logger.getLogger(RelationshipMappingRename.class.getName()); + private static final Logger LOG = Logger.getLogger(RelationshipMappingRename.class.getName()); public RelationshipMappingRename(RenameRefactoring rename) { this.rename = rename; diff --git a/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/whereused/RelationshipMappingWhereUsed.java b/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/whereused/RelationshipMappingWhereUsed.java index 197496e9a518..359315bd674d 100644 --- a/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/whereused/RelationshipMappingWhereUsed.java +++ b/java/j2ee.jpa.refactoring/src/org/netbeans/modules/j2ee/jpa/refactoring/whereused/RelationshipMappingWhereUsed.java @@ -73,7 +73,7 @@ public final class RelationshipMappingWhereUsed extends JavaRefactoringPlugin { private final WhereUsedQuery whereUsedQuery; - private final static Logger LOG = Logger.getLogger(RelationshipMappingWhereUsed.class.getName()); + private static final Logger LOG = Logger.getLogger(RelationshipMappingWhereUsed.class.getName()); public RelationshipMappingWhereUsed(WhereUsedQuery refactoring) { this.whereUsedQuery = refactoring; diff --git a/java/j2ee.jpa.refactoring/test/unit/src/org/netbeans/modules/j2ee/jpa/refactoring/SourceTestSupport.java b/java/j2ee.jpa.refactoring/test/unit/src/org/netbeans/modules/j2ee/jpa/refactoring/SourceTestSupport.java index 97c4ce83051e..621b563bddb7 100644 --- a/java/j2ee.jpa.refactoring/test/unit/src/org/netbeans/modules/j2ee/jpa/refactoring/SourceTestSupport.java +++ b/java/j2ee.jpa.refactoring/test/unit/src/org/netbeans/modules/j2ee/jpa/refactoring/SourceTestSupport.java @@ -144,7 +144,7 @@ public String getSourceLevel(FileObject javaFile) { } - static private class JavaFileResolver extends MIMEResolver + private static class JavaFileResolver extends MIMEResolver { public JavaFileResolver() { diff --git a/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/JPAProblemFinder.java b/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/JPAProblemFinder.java index b30c9dee3434..75de92860953 100644 --- a/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/JPAProblemFinder.java +++ b/java/j2ee.jpa.verification/src/org/netbeans/modules/j2ee/jpa/verification/JPAProblemFinder.java @@ -58,9 +58,9 @@ public abstract class JPAProblemFinder { private JPAProblemContext context = null; private List problemsFound = new ArrayList(); - public final static Logger LOG = Logger.getLogger(JPAProblemFinder.class.getName()); - private final static String PERSISTENCE_SCOPES_LISTENER = "jpa.verification.scopes_listener"; //NOI18N - private final static Object singleInstanceLock = new Object(); + public static final Logger LOG = Logger.getLogger(JPAProblemFinder.class.getName()); + private static final String PERSISTENCE_SCOPES_LISTENER = "jpa.verification.scopes_listener"; //NOI18N + private static final Object singleInstanceLock = new Object(); private static JPAProblemFinder runningInstance = null; private static boolean usgLogged; diff --git a/java/j2ee.metadata.model.support/src/org/netbeans/modules/j2ee/metadata/model/api/support/annotation/parser/AnnotationParser.java b/java/j2ee.metadata.model.support/src/org/netbeans/modules/j2ee/metadata/model/api/support/annotation/parser/AnnotationParser.java index f7f18b1248d1..2f12ff4aaae1 100644 --- a/java/j2ee.metadata.model.support/src/org/netbeans/modules/j2ee/metadata/model/api/support/annotation/parser/AnnotationParser.java +++ b/java/j2ee.metadata.model.support/src/org/netbeans/modules/j2ee/metadata/model/api/support/annotation/parser/AnnotationParser.java @@ -78,7 +78,7 @@ */ public final class AnnotationParser { - private final static Set> PRIMITIVE_WRAPPERS = new HashSet>(); + private static final Set> PRIMITIVE_WRAPPERS = new HashSet>(); private final Map providers = new HashMap(); private final AnnotationHelper helper; @@ -343,7 +343,7 @@ private void addProvider(String name, ValueProvider provider) { /** * Simple DefaultProvider implementation. */ - private final static class DefaultProviderImpl implements DefaultProvider { + private static final class DefaultProviderImpl implements DefaultProvider { private final Object defaultValue; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/PersistenceUnit.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/PersistenceUnit.java index 16fa589beff6..ee70897e935b 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/PersistenceUnit.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/PersistenceUnit.java @@ -37,8 +37,8 @@ public interface PersistenceUnit { static public final String PROPERTIES = "Properties"; // NOI18N // - static public final String JTA_TRANSACTIONTYPE="JTA";//NOI18N - static public final String RESOURCE_LOCAL_TRANSACTIONTYPE="RESOURCE_LOCAL";//NOI18N + public static final String JTA_TRANSACTIONTYPE="JTA";//NOI18N + public static final String RESOURCE_LOCAL_TRANSACTIONTYPE="RESOURCE_LOCAL";//NOI18N public void setName(java.lang.String value); public java.lang.String getName(); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Property.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Property.java index 1ffda21c6c33..872b3500c5bb 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Property.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Property.java @@ -24,8 +24,8 @@ * @author sp153251 */ public interface Property { - static public final String NAME = "Name"; // NOI18N - static public final String VALUE = "Value"; // NOI18N + public static final String NAME = "Name"; // NOI18N + public static final String VALUE = "Value"; // NOI18N public void setName(java.lang.String value); public java.lang.String getName(); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/editor/completion/JPACompletionItem.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/editor/completion/JPACompletionItem.java index cb5b150f8c4e..4ce2e595af04 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/editor/completion/JPACompletionItem.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/editor/completion/JPACompletionItem.java @@ -689,9 +689,9 @@ public Object getAssociatedObject() { } public static final class IndexElementItem extends DBElementItem { - public final static String ASC = "ASC"; - public final static String DESC = "DESC"; - public final static String[] PARAMS = {ASC, DESC}; + public static final String ASC = "ASC"; + public static final String DESC = "DESC"; + public static final String[] PARAMS = {ASC, DESC}; private final int shift; protected static CCPaintComponent.TableElementPaintComponent paintComponent = null; @@ -851,7 +851,7 @@ public Object getAssociatedObject() { } } - abstract private static class PersistenceXmlCompletionItem extends JPACompletionItem { + private abstract static class PersistenceXmlCompletionItem extends JPACompletionItem { ///////// protected int substitutionOffset; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java index 0f52d336fa0c..9f416f0ab294 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java @@ -55,7 +55,7 @@ public class DbSchemaEjbGenerator { private Set tablesReferecedByOtherTables; private Set primaryKeyIsForeignKeyTables; private final CollectionType colectionType; - private final static Logger LOGGER = Logger.getLogger(DbSchemaEjbGenerator.class.getName()); + private static final Logger LOGGER = Logger.getLogger(DbSchemaEjbGenerator.class.getName()); private boolean useColumNamesInRelations = false; //private ArrayList warningMessages; private final boolean generateUnresolvedRelationships; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/jpqleditor/JPQLExecutor.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/jpqleditor/JPQLExecutor.java index 0165e118e47b..c7a99831724a 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/jpqleditor/JPQLExecutor.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/jpqleditor/JPQLExecutor.java @@ -66,17 +66,17 @@ */ public class JPQLExecutor { - static private final String ECLIPSELINK_QUERY = "org.eclipse.persistence.jpa.JpaQuery";//NOI18N - static private final String ECLIPSELINK_QUERY_SQL0 = "getDatabaseQuery";//NOI18N - static private final String ECLIPSELINK_QUERY_SQL1 = "getSQLString";//NOI18N - static private final String HIBERNATE_QUERY = "org.hibernate.ejb.HibernateQuery";//NOI18N - static private final String HIBERNATE_QUERY_SQL0 = "getSessionFactory";//NOI18N - static private final String HIBERNATE_QUERY_SQL1 = "getQueryPlanCache";//NOI18N - static private final String HIBERNATE_QUERY_SQL2 = "getHQLQueryPlan";//NOI18N - static private final String HIBERNATE_QUERY_SQL3 = "getTranslators";//NOI18N - static private final String HIBERNATE_QUERY_SQL4 = "getSQLString";//NOI18N - static private final String OPENJPA_QUERY = "org.apache.openjpa.persistence.QueryImpl";//NOI18N - static private final String OPENJPA_QUERY_SQL = "getQueryString";//NOI18N + private static final String ECLIPSELINK_QUERY = "org.eclipse.persistence.jpa.JpaQuery";//NOI18N + private static final String ECLIPSELINK_QUERY_SQL0 = "getDatabaseQuery";//NOI18N + private static final String ECLIPSELINK_QUERY_SQL1 = "getSQLString";//NOI18N + private static final String HIBERNATE_QUERY = "org.hibernate.ejb.HibernateQuery";//NOI18N + private static final String HIBERNATE_QUERY_SQL0 = "getSessionFactory";//NOI18N + private static final String HIBERNATE_QUERY_SQL1 = "getQueryPlanCache";//NOI18N + private static final String HIBERNATE_QUERY_SQL2 = "getHQLQueryPlan";//NOI18N + private static final String HIBERNATE_QUERY_SQL3 = "getTranslators";//NOI18N + private static final String HIBERNATE_QUERY_SQL4 = "getSQLString";//NOI18N + private static final String OPENJPA_QUERY = "org.apache.openjpa.persistence.QueryImpl";//NOI18N + private static final String OPENJPA_QUERY_SQL = "getQueryString";//NOI18N /** * Executes given JPQL query and returns the result. diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ToplinkProvider.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ToplinkProvider.java index 0d1a942f274f..ff73f99f73f0 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ToplinkProvider.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ToplinkProvider.java @@ -40,7 +40,7 @@ class ToplinkProvider extends Provider{ */ private static final String PREFERRED_PROVIDER_CLASS = "oracle.toplink.essentials.PersistenceProvider"; //NOI18N private static final String ALTERNATIVE_PROVIDER_CLASS = "oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider";//NOI18N - private final static String ECLIPSELINK_PROVIDER_CLASS = "org.eclipse.persistence.jpa.PersistenceProvider";//NOI18N + private static final String ECLIPSELINK_PROVIDER_CLASS = "org.eclipse.persistence.jpa.PersistenceProvider";//NOI18N /** * Creates a new instance using the preferred provider class. diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/jpql/ManagedType.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/jpql/ManagedType.java index f95ce77abd6f..e1f515c95cb0 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/jpql/ManagedType.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/jpql/ManagedType.java @@ -41,7 +41,7 @@ * * @author sp153251 */ -abstract public class ManagedType implements IManagedType { +public abstract class ManagedType implements IManagedType { private final PersistentObject element; private final IManagedTypeProvider provider; private Map mappings; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java index ea652f7e75e8..a12c8adfd657 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java @@ -36,22 +36,22 @@ public class PersistenceCfgProperties { // String[] for selecting one of the values - private final static String[] TRUE_FALSE = new String[]{"true", "false"}; // NOI18N - private final static String[] SCHEMA_GEN_OPTIONS = new String[]{"none", "create", "drop-and-create", "drop"}; - private final static String[] SCHEMA_GEN_SOURCE_TYPES = new String[]{"metadata", "script", "metadata-then-script", "script-then-metadata"}; + private static final String[] TRUE_FALSE = new String[]{"true", "false"}; // NOI18N + private static final String[] SCHEMA_GEN_OPTIONS = new String[]{"none", "create", "drop-and-create", "drop"}; + private static final String[] SCHEMA_GEN_SOURCE_TYPES = new String[]{"metadata", "script", "metadata-then-script", "script-then-metadata"}; //eclipselink - private final static String[] EL_CACHE_TYPES = new String[]{"Full", "Weak", "Soft", "SoftWeak", "HardWeak", "NONE"};//NOI18N - private final static String[] EL_FLUSH_CLEAR_CACHE = new String[]{"Drop", "DropInvalidate", "Merge"};//NOI18N - private final static String[] EL_WEAWING = new String[] {"true", "false", "static"};//NOI18N - private final static String[] EL_PROFILER = new String[]{"PerformanceProfiler", "QueryMonitor", "NoProfiler"};//NOI18N - private final static String[] EL_CONTEXT_REFMODE = new String[]{"HARD", "WEAK", "FORCE_WEAK"};//NOI18N - private final static String[] EL_BATCHWRITER = new String[]{"JDBC", "Buffered", "Oracle-JDBC", "None"};//NOI18N - private final static String[] EL_EXCLUSIVE_CON_MODE = new String[]{"Transactional", "Isolated", "Always"};//NOI18N - private final static String[] EL_LOGGER = new String[]{"DefaultLogger", "JavaLogger", "ServerLogger"};//NOI18N - private final static String[] EL_LOGGER_LEVEL = new String[]{"OFF", "SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "FINER", "FINEST", "ALL"};//NOI18N - private final static String[] EL_TARGET_DATABASE = new String[]{"Access", "Attunity", "Auto", "Cloudscape", "Database", "DB2Mainframe", "DB2", "DB2Z", "DBase", "Derby", "Firebird", "H2", "HANA", "HSQL", "Informix11", "Informix", "JavaDB", "MaxDB", "MySQL", "Oracle10", "Oracle11", "Oracle12", "Oracle18", "Oracle19", "Oracle8", "Oracle9", "Oracle", "Pervasive", "PointBase", "PostgreSQL", "SQLAnywhere", "SQLServer", "Sybase", "Symfoware", "TimesTen7", "TimesTen"};//NOI18N - private final static String[] EL_TARGET_SERVER = new String[]{"None", "Glassfish", "JBoss", "Oc4j", "SAPNetWeaver_7_1", "SunAS9Server", "WebLogic_10", "WebLogic_12", "WebLogic_9", "WebLogic", "WebSphere_6_1", "WebSphere_7", "WebSphere_EJBEmbeddable", "WebSphere_Liberty", "WebSphere"};//NOI18N - private final static String[] EL_DDL_GEN_MODE = new String[]{"both", "database", "sql-script"};//NOI18N + private static final String[] EL_CACHE_TYPES = new String[]{"Full", "Weak", "Soft", "SoftWeak", "HardWeak", "NONE"};//NOI18N + private static final String[] EL_FLUSH_CLEAR_CACHE = new String[]{"Drop", "DropInvalidate", "Merge"};//NOI18N + private static final String[] EL_WEAWING = new String[] {"true", "false", "static"};//NOI18N + private static final String[] EL_PROFILER = new String[]{"PerformanceProfiler", "QueryMonitor", "NoProfiler"};//NOI18N + private static final String[] EL_CONTEXT_REFMODE = new String[]{"HARD", "WEAK", "FORCE_WEAK"};//NOI18N + private static final String[] EL_BATCHWRITER = new String[]{"JDBC", "Buffered", "Oracle-JDBC", "None"};//NOI18N + private static final String[] EL_EXCLUSIVE_CON_MODE = new String[]{"Transactional", "Isolated", "Always"};//NOI18N + private static final String[] EL_LOGGER = new String[]{"DefaultLogger", "JavaLogger", "ServerLogger"};//NOI18N + private static final String[] EL_LOGGER_LEVEL = new String[]{"OFF", "SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "FINER", "FINEST", "ALL"};//NOI18N + private static final String[] EL_TARGET_DATABASE = new String[]{"Access", "Attunity", "Auto", "Cloudscape", "Database", "DB2Mainframe", "DB2", "DB2Z", "DBase", "Derby", "Firebird", "H2", "HANA", "HSQL", "Informix11", "Informix", "JavaDB", "MaxDB", "MySQL", "Oracle10", "Oracle11", "Oracle12", "Oracle18", "Oracle19", "Oracle8", "Oracle9", "Oracle", "Pervasive", "PointBase", "PostgreSQL", "SQLAnywhere", "SQLServer", "Sybase", "Symfoware", "TimesTen7", "TimesTen"};//NOI18N + private static final String[] EL_TARGET_SERVER = new String[]{"None", "Glassfish", "JBoss", "Oc4j", "SAPNetWeaver_7_1", "SunAS9Server", "WebLogic_10", "WebLogic_12", "WebLogic_9", "WebLogic", "WebSphere_6_1", "WebSphere_7", "WebSphere_EJBEmbeddable", "WebSphere_Liberty", "WebSphere"};//NOI18N + private static final String[] EL_DDL_GEN_MODE = new String[]{"both", "database", "sql-script"};//NOI18N private static final Map> possiblePropertyValues = new HashMap>(); @@ -248,7 +248,7 @@ public static List getProviders(){ return ret; } - private final static class KeyOrder implements Comparator{ + private static final class KeyOrder implements Comparator{ @Override public int compare(String o1, String o2) { diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java index a0d363f3ed7c..ca0d50cffe7f 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java @@ -59,9 +59,9 @@ */ public final class PersistenceProviderComboboxHelper { - private final static String SEPARATOR = "PersistenceProviderComboboxHelper.SEPARATOR"; - private final static String EMPTY = "PersistenceProviderComboboxHelper.EMPTY"; - private final static Provider preferredProvider = ProviderUtil.ECLIPSELINK_PROVIDER; + private static final String SEPARATOR = "PersistenceProviderComboboxHelper.SEPARATOR"; + private static final String EMPTY = "PersistenceProviderComboboxHelper.EMPTY"; + private static final Provider preferredProvider = ProviderUtil.ECLIPSELINK_PROVIDER; private final PersistenceProviderSupplier providerSupplier; private final Project project; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/PersistenceClientEntitySelection.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/PersistenceClientEntitySelection.java index 8e830efaa7e1..c7e81b3fd485 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/PersistenceClientEntitySelection.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/PersistenceClientEntitySelection.java @@ -32,7 +32,7 @@ * @author Pavel Buzek */ public final class PersistenceClientEntitySelection implements WizardDescriptor.Panel, WizardDescriptor.FinishablePanel, ChangeListener { - public final static String DISABLENOIDSELECTION = "disableNoIdSelection";//NOI18N, used to control if entities without id can be selected + public static final String DISABLENOIDSELECTION = "disableNoIdSelection";//NOI18N, used to control if entities without id can be selected private WizardDescriptor wizardDescriptor; private String panelName; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/Util.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/Util.java index 9dfae65d1061..5800f11a84ab 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/Util.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/Util.java @@ -786,7 +786,7 @@ public static String getCandidateName(Project project) { * @return true if the given candidate represents a unique * name within the names of the given punits, false otherwise. */ - static private boolean isUnique(String candidate, PersistenceUnit[] punits) { + private static boolean isUnique(String candidate, PersistenceUnit[] punits) { for (PersistenceUnit punit : punits) { if (candidate.equals(punit.getName())) { return false; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/dbscript/DBScriptPanel.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/dbscript/DBScriptPanel.java index 8f7f00008d93..79e18970a078 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/dbscript/DBScriptPanel.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/dbscript/DBScriptPanel.java @@ -55,7 +55,7 @@ */ public class DBScriptPanel extends javax.swing.JPanel { - private final static Logger LOGGER = Logger.getLogger(DBScriptPanel.class.getName()); + private static final Logger LOGGER = Logger.getLogger(DBScriptPanel.class.getName()); private static final String EXTENSION = "sql";//NOI18N private final ChangeSupport changeSupport = new ChangeSupport(this); private JTextComponent packageComboBoxEditor; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java index 43382645479d..c32fc7e5f7ac 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java @@ -76,7 +76,7 @@ */ public class EntityClassesPanel extends javax.swing.JPanel { - private final static Logger LOGGER = Logger.getLogger(EntityClassesPanel.class.getName()); + private static final Logger LOGGER = Logger.getLogger(EntityClassesPanel.class.getName()); private final ChangeSupport changeSupport = new ChangeSupport(this); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableSource.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableSource.java index 435a699bdd96..79f92d1e2491 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableSource.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableSource.java @@ -39,7 +39,7 @@ public class TableSource { public enum Type { DATA_SOURCE, CONNECTION, SCHEMA_FILE }; - private final static Map PROJECT_TO_SOURCE = new WeakHashMap(); + private static final Map PROJECT_TO_SOURCE = new WeakHashMap(); private final Type type; private final String name; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableUISupport.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableUISupport.java index bce6269ba55f..31385992af5c 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableUISupport.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/TableUISupport.java @@ -122,7 +122,7 @@ private static void setRenderer(TableColumn column) { } } - private static abstract class TableModel extends AbstractListModel { + private abstract static class TableModel extends AbstractListModel { public abstract Table getElementAt(int index); } diff --git a/java/j2ee.persistence/test/unit/src/org/netbeans/modules/j2ee/persistence/sourcetestsupport/SourceTestSupport.java b/java/j2ee.persistence/test/unit/src/org/netbeans/modules/j2ee/persistence/sourcetestsupport/SourceTestSupport.java index fd624594d73a..0250fb85f3dd 100644 --- a/java/j2ee.persistence/test/unit/src/org/netbeans/modules/j2ee/persistence/sourcetestsupport/SourceTestSupport.java +++ b/java/j2ee.persistence/test/unit/src/org/netbeans/modules/j2ee/persistence/sourcetestsupport/SourceTestSupport.java @@ -127,7 +127,7 @@ public String getSourceLevel(FileObject javaFile) { } - static private class JavaFileResolver extends MIMEResolver + private static class JavaFileResolver extends MIMEResolver { public JavaFileResolver() { diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java index 447bbcc08e6d..afd5fb7ec2dd 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java @@ -60,8 +60,8 @@ public class AppletSupport { /** constant for class extension */ private static final String CLASS_EXT = "class"; // NOI18N - private final static String POLICY_FILE_NAME = "applet"; - private final static String POLICY_FILE_EXT = "policy"; + private static final String POLICY_FILE_NAME = "applet"; + private static final String POLICY_FILE_EXT = "policy"; private AppletSupport() {} diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ModuleClassPaths.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ModuleClassPaths.java index 2fb8d6fe6763..7ea5c50fc60c 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ModuleClassPaths.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ModuleClassPaths.java @@ -1322,7 +1322,7 @@ static Predicate create(@NonNull final Set name } } - private static abstract class BaseClassPathImplementation implements ClassPathImplementation { + private abstract static class BaseClassPathImplementation implements ClassPathImplementation { private final PropertyChangeSupport listeners; //@GuardedBy("this") diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/impl/RootsAccessor.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/impl/RootsAccessor.java index 2a5a48e7c14f..44458c0eefa9 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/impl/RootsAccessor.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/impl/RootsAccessor.java @@ -32,7 +32,7 @@ public abstract class RootsAccessor { private static volatile RootsAccessor instance; - public synchronized static RootsAccessor getInstance() { + public static synchronized RootsAccessor getInstance() { if (instance == null) { try { Class.forName(Roots.class.getName(),true,RootsAccessor.class.getClassLoader()); diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/BaseActionProvider.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/BaseActionProvider.java index 5603835b4aac..59268ffef27e 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/BaseActionProvider.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/BaseActionProvider.java @@ -127,20 +127,20 @@ public void propertyChange(final PropertyChangeEvent evt) { this.delegate = new AtomicReference<>(); } - abstract protected String[] getPlatformSensitiveActions(); + protected abstract String[] getPlatformSensitiveActions(); - abstract protected String[] getActionsDisabledForQuickRun(); + protected abstract String[] getActionsDisabledForQuickRun(); /** Return map from commands to ant targets */ - abstract public Map getCommands(); + public abstract Map getCommands(); /**Return set of commands which are affected by background scanning*/ - abstract protected Set getScanSensitiveActions(); + protected abstract Set getScanSensitiveActions(); /**Return set of commands which need java model up to date*/ - abstract protected Set getJavaModelActions(); + protected abstract Set getJavaModelActions(); - abstract protected boolean isCompileOnSaveEnabled(); + protected abstract boolean isCompileOnSaveEnabled(); /** * Returns CoS update status. diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/JavaActionProvider.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/JavaActionProvider.java index 58f319c22039..a28d199b9bdb 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/JavaActionProvider.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/JavaActionProvider.java @@ -371,7 +371,7 @@ Set copyAdditionalProperties(@NonNull final Map into) { } - public static abstract class ScriptAction implements Action { + public abstract static class ScriptAction implements Action { private final String command; private final String displayName; private final Set actionFlags; diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java index 018bf5fd93ee..0c4ec7f2afe7 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/MultiModuleNodeFactory.java @@ -1094,7 +1094,7 @@ public void propertyChange(PropertyChangeEvent evt) { } } - private final static class Key { + private static final class Key { private final boolean sources; private final boolean tests; private final boolean generated; diff --git a/java/java.completion/src/org/netbeans/modules/java/completion/Utilities.java b/java/java.completion/src/org/netbeans/modules/java/completion/Utilities.java index e1f3c376c58e..7b92de86b851 100644 --- a/java/java.completion/src/org/netbeans/modules/java/completion/Utilities.java +++ b/java/java.completion/src/org/netbeans/modules/java/completion/Utilities.java @@ -208,8 +208,8 @@ public static boolean isShowDeprecatedMembers() { return showDeprecatedMembers; } - static private final AtomicReference> excludeRef = new AtomicReference<>(); - static private final AtomicReference> includeRef = new AtomicReference<>(); + private static final AtomicReference> excludeRef = new AtomicReference<>(); + private static final AtomicReference> includeRef = new AtomicReference<>(); private static void updateExcluder(AtomicReference> existing, String updated) { Collection nue = new LinkedList<>(); diff --git a/java/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/GenericMethodInvocation.java b/java/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/GenericMethodInvocation.java index 6e5fb77f0a28..a4b6efadadde 100644 --- a/java/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/GenericMethodInvocation.java +++ b/java/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/GenericMethodInvocation.java @@ -38,5 +38,5 @@ public void test() { } - public static abstract class Joint implements CharSequence, Runnable {} + public abstract static class Joint implements CharSequence, Runnable {} } diff --git a/java/java.disco/src/org/netbeans/modules/java/disco/Client.java b/java/java.disco/src/org/netbeans/modules/java/disco/Client.java index 9150f4001153..de8a3c3da5d4 100644 --- a/java/java.disco/src/org/netbeans/modules/java/disco/Client.java +++ b/java/java.disco/src/org/netbeans/modules/java/disco/Client.java @@ -47,7 +47,7 @@ public class Client { - private final static Client INSTANCE = new Client(); + private static final Client INSTANCE = new Client(); private DiscoClient client = null; @@ -69,7 +69,7 @@ private synchronized DiscoClient getDisco() { private Client() { } - public synchronized final List getAllLTSVersions() { + public final synchronized List getAllLTSVersions() { Queue majorVersions = getDisco().getAllMajorVersions(false); return majorVersions.stream() .filter(majorVersion -> majorVersion.isMaintained()) diff --git a/java/java.disco/src/org/netbeans/modules/java/disco/DownloadPanel.java b/java/java.disco/src/org/netbeans/modules/java/disco/DownloadPanel.java index 4176ade6665a..5085b9c92719 100644 --- a/java/java.disco/src/org/netbeans/modules/java/disco/DownloadPanel.java +++ b/java/java.disco/src/org/netbeans/modules/java/disco/DownloadPanel.java @@ -44,7 +44,7 @@ @SuppressWarnings("initialization") public class DownloadPanel extends javax.swing.JPanel { - public final static String PROP_DOWNLOAD_FINISHED = "downloadFinished"; + public static final String PROP_DOWNLOAD_FINISHED = "downloadFinished"; private boolean downloadFinished; private File download; diff --git a/java/java.disco/src/org/netbeans/modules/java/disco/archive/JDKCommonsUnzip.java b/java/java.disco/src/org/netbeans/modules/java/disco/archive/JDKCommonsUnzip.java index d7678bea230f..6c4cef1f2196 100644 --- a/java/java.disco/src/org/netbeans/modules/java/disco/archive/JDKCommonsUnzip.java +++ b/java/java.disco/src/org/netbeans/modules/java/disco/archive/JDKCommonsUnzip.java @@ -26,7 +26,7 @@ public class JDKCommonsUnzip extends CommonsUnzip { - private final static File[] EMPTY_FILES = new File[0]; + private static final File[] EMPTY_FILES = new File[0]; @Override public void uncompress(File zip, File targetDir, InputOutput io) throws IOException { diff --git a/java/java.disco/src/org/netbeans/modules/java/disco/archive/UnarchiveUtils.java b/java/java.disco/src/org/netbeans/modules/java/disco/archive/UnarchiveUtils.java index 65e3360cb68d..83f760863560 100644 --- a/java/java.disco/src/org/netbeans/modules/java/disco/archive/UnarchiveUtils.java +++ b/java/java.disco/src/org/netbeans/modules/java/disco/archive/UnarchiveUtils.java @@ -24,7 +24,7 @@ public class UnarchiveUtils { - private final static Unarchiver[] zipUnarchivers = new Unarchiver[]{ + private static final Unarchiver[] zipUnarchivers = new Unarchiver[]{ new CommandLineUnzip(), new CommandLineUntar(), new JDKCommonsUnzip() diff --git a/java/java.editor.base/src/org/netbeans/modules/java/editor/base/javadoc/Utilities.java b/java/java.editor.base/src/org/netbeans/modules/java/editor/base/javadoc/Utilities.java index 7dc69943d48c..3000021d562f 100644 --- a/java/java.editor.base/src/org/netbeans/modules/java/editor/base/javadoc/Utilities.java +++ b/java/java.editor.base/src/org/netbeans/modules/java/editor/base/javadoc/Utilities.java @@ -210,8 +210,8 @@ public static boolean isShowDeprecatedMembers() { return showDeprecatedMembers; } - static private final AtomicReference> excludeRef = new AtomicReference<>(); - static private final AtomicReference> includeRef = new AtomicReference<>(); + private static final AtomicReference> excludeRef = new AtomicReference<>(); + private static final AtomicReference> includeRef = new AtomicReference<>(); private static void updateExcluder(AtomicReference> existing, String updated) { Collection nue = new LinkedList<>(); diff --git a/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java b/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java index 2353391d8142..2f1a47a8b777 100644 --- a/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java +++ b/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java @@ -130,7 +130,7 @@ public static List findUnused(CompilationInfo info) { } /** Detects static final long SerialVersionUID - * @return true if element is final static long serialVersionUID + * @return true if element is static final long serialVersionUID */ private static boolean isSerialSpecField(CompilationInfo info, Element el) { if (el.getModifiers().contains(Modifier.FINAL) diff --git a/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/MarkCorrespondingMethods1.java b/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/MarkCorrespondingMethods1.java index 00efd79d267a..7754abdfbd74 100644 --- a/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/MarkCorrespondingMethods1.java +++ b/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/MarkCorrespondingMethods1.java @@ -96,7 +96,7 @@ public CharSequence subSequence(int arg0, int arg1) { } - public static abstract class X implements CharSequence { + public abstract static class X implements CharSequence { public @Override int hashCode() { return 0; } diff --git a/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/ReadWriteUseArgumentOfAbstractMethod.java b/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/ReadWriteUseArgumentOfAbstractMethod.java index 1ab07667da10..6d1ab8e39e52 100644 --- a/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/ReadWriteUseArgumentOfAbstractMethod.java +++ b/java/java.editor.base/test/unit/data/org/netbeans/modules/java/editor/base/semantic/data/ReadWriteUseArgumentOfAbstractMethod.java @@ -14,7 +14,7 @@ public static interface Y { } - public static abstract class Z { + public abstract static class Z { public abstract void test(int arg1, Object arg2); diff --git a/java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java b/java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java index 236b84ce9bf7..664d41f96ca1 100644 --- a/java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java +++ b/java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java @@ -604,7 +604,7 @@ public void run() { return null; } - static abstract class WhiteListJavaCompletionItem extends JavaCompletionItem { + abstract static class WhiteListJavaCompletionItem extends JavaCompletionItem { private static final String WARNING = "org/netbeans/modules/java/editor/resources/warning_badge.gif"; //NOI18N private static ImageIcon warningIcon; diff --git a/java/java.editor/src/org/netbeans/modules/java/editor/codegen/EqualsHashCodeGenerator.java b/java/java.editor/src/org/netbeans/modules/java/editor/codegen/EqualsHashCodeGenerator.java index 238e2b018a27..51cec2cd09f7 100644 --- a/java/java.editor/src/org/netbeans/modules/java/editor/codegen/EqualsHashCodeGenerator.java +++ b/java/java.editor/src/org/netbeans/modules/java/editor/codegen/EqualsHashCodeGenerator.java @@ -126,7 +126,7 @@ public List create(Lookup context) { } } - final private JTextComponent component; + private final JTextComponent component; final ElementNode.Description description; final boolean generateEquals; final boolean generateHashCode; diff --git a/java/java.editor/src/org/netbeans/modules/java/editor/fold/JavaElementFoldManager.java b/java/java.editor/src/org/netbeans/modules/java/editor/fold/JavaElementFoldManager.java index e2e35d0d9a16..08a7f4c539e0 100644 --- a/java/java.editor/src/org/netbeans/modules/java/editor/fold/JavaElementFoldManager.java +++ b/java/java.editor/src/org/netbeans/modules/java/editor/fold/JavaElementFoldManager.java @@ -173,7 +173,7 @@ private synchronized void invalidate() { static final class JavaElementFoldTask extends ScanningCancellableTask { //XXX: this will hold JavaElementFoldTask as long as the FileObject exists: - private final static Map file2Task = new WeakHashMap(); + private static final Map file2Task = new WeakHashMap(); private AtomicLong version = new AtomicLong(0); diff --git a/java/java.examples/anagrams/src/com/toy/anagrams/lib/StaticWordLibrary.java b/java/java.examples/anagrams/src/com/toy/anagrams/lib/StaticWordLibrary.java index 216d88dd98c9..4e0a3e915562 100644 --- a/java/java.examples/anagrams/src/com/toy/anagrams/lib/StaticWordLibrary.java +++ b/java/java.examples/anagrams/src/com/toy/anagrams/lib/StaticWordLibrary.java @@ -121,7 +121,7 @@ final class StaticWordLibrary extends WordLibrary { "rtdatioialn" }; - final static WordLibrary DEFAULT = new StaticWordLibrary(); + static final WordLibrary DEFAULT = new StaticWordLibrary(); /** * Singleton class. diff --git a/java/java.guards/src/org/netbeans/modules/java/guards/JavaGuardedReader.java b/java/java.guards/src/org/netbeans/modules/java/guards/JavaGuardedReader.java index 76ace08ea158..f87899824fe3 100644 --- a/java/java.guards/src/org/netbeans/modules/java/guards/JavaGuardedReader.java +++ b/java/java.guards/src/org/netbeans/modules/java/guards/JavaGuardedReader.java @@ -40,7 +40,7 @@ final class JavaGuardedReader { /** The prefix of all magic strings */ - final static String MAGIC_PREFIX = "//GEN-"; // NOI18N + static final String MAGIC_PREFIX = "//GEN-"; // NOI18N Pattern magicsAsRE; diff --git a/java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/test/TestPerformer.java b/java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/test/TestPerformer.java index a795a3e5ba09..9eadafdca993 100644 --- a/java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/test/TestPerformer.java +++ b/java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/test/TestPerformer.java @@ -180,7 +180,7 @@ public int compare(HintDescription o1, HintDescription o2) { * @param content the contents of the returned file. * @return the created file */ - private final static FileObject copyStringToFile (FileObject f, String content) throws Exception { + private static final FileObject copyStringToFile (FileObject f, String content) throws Exception { OutputStream os = f.getOutputStream(); InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8")); FileUtil.copy(is, os); diff --git a/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanel.java b/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanel.java index 3854d95ab5a9..1de47e0112c9 100644 --- a/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanel.java +++ b/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanel.java @@ -111,7 +111,7 @@ public final class HintsPanel extends javax.swing.JPanel { private static final String DECLARATIVE_HINT_TEMPLATE_LOCATION = "org-netbeans-modules-java-hints/templates/Inspection.hint"; static final String[] EXTRA_NODE_KEYWORDS = new String[] {"CTL_DepScanning", "CTL_Scope_Desc", "CTL_Scope_Label"}; - private final static RequestProcessor WORKER = new RequestProcessor(HintsPanel.class.getName(), 1, false, false); + private static final RequestProcessor WORKER = new RequestProcessor(HintsPanel.class.getName(), 1, false, false); private HintsPanelLogic logic; private DefaultTreeModel errorTreeModel; diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/AnalyzeFolder.java b/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/AnalyzeFolder.java index 101957b1f758..42391d504664 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/AnalyzeFolder.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/AnalyzeFolder.java @@ -111,7 +111,7 @@ public Action createContextAwareInstance(Lookup actionContext) { return new AnalyzeFolder(actionContext); } - public final static class ToolsAction extends SystemAction implements ContextAwareAction { + public static final class ToolsAction extends SystemAction implements ContextAwareAction { private Action delegate; diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/ui/AnalyzerTopComponent.java b/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/ui/AnalyzerTopComponent.java index 66d0db02faaa..892a90f1352a 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/ui/AnalyzerTopComponent.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/analyzer/ui/AnalyzerTopComponent.java @@ -370,7 +370,7 @@ public Object writeReplace() { protected String preferredID() { return PREFERRED_ID; } - final static class ResolvableHelper implements Serializable { + static final class ResolvableHelper implements Serializable { private static final long serialVersionUID = 1L; public Object readResolve() { diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/errors/ChangeMethodReturnType.java b/java/java.hints/src/org/netbeans/modules/java/hints/errors/ChangeMethodReturnType.java index 952cef1b7794..dfcfd147d924 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/errors/ChangeMethodReturnType.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/errors/ChangeMethodReturnType.java @@ -49,7 +49,7 @@ */ public class ChangeMethodReturnType implements ErrorRule { - private final static Set CODES = new HashSet(Arrays.asList( + private static final Set CODES = new HashSet(Arrays.asList( "compiler.err.cant.ret.val.from.meth.decl.void", "compiler.err.prob.found.req" )); diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImplementAllAbstractMethods.java b/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImplementAllAbstractMethods.java index 6089365b0e44..7e2c0003c3b9 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImplementAllAbstractMethods.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImplementAllAbstractMethods.java @@ -282,7 +282,7 @@ private static TreePath deepTreePath(CompilationInfo info, int offset) { return basic; } - static abstract class ImplementFixBase extends CreateFixBase implements Task, DebugFix { + abstract static class ImplementFixBase extends CreateFixBase implements Task, DebugFix { protected final JavaSource source; protected final TreePathHandle handle; protected final ElementHandle implementType; diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImportClass.java b/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImportClass.java index 15018a2398e3..9b4bdce65a3e 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImportClass.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/errors/ImportClass.java @@ -357,7 +357,7 @@ public ComputeImports getCandidateFQNs(CompilationInfo info, FileObject file, St } @Messages("WRN_FileInvalid=Cannot resolve file - already deleted?") - static abstract class FixBase implements EnhancedFix { + abstract static class FixBase implements EnhancedFix { static final Logger LOG = Logger.getLogger(FixImport.class.getName()); protected final String fqn; protected final ElementHandle toImport; diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToString.java b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToString.java index b00b3073b200..5e8d2ed33e2a 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToString.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertTextBlockToString.java @@ -98,7 +98,7 @@ protected void performRewrite(TransformationContext ctx) { ctx.getWorkingCopy().rewrite(ctx.getPath().getLeaf(), ext); } - static private ExpressionTree buildTree(String textBlockLines[], int currentLine, TransformationContext ctx) { + private static ExpressionTree buildTree(String textBlockLines[], int currentLine, TransformationContext ctx) { if (currentLine == 0) { return ctx.getWorkingCopy().getTreeMaker().Literal(textBlockLines[0] + "\n");// NOI18N } diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java index f1a19dafff0e..027c9520d752 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java @@ -63,7 +63,7 @@ public class ConvertToVarHint { // hint will be disabled for error codes present in SKIPPED_ERROR_CODES. - private final static String[] SKIPPED_ERROR_CODES = { + private static final String[] SKIPPED_ERROR_CODES = { "compiler.err.generic.array.creation" //NOI18N }; diff --git a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/ConnectionMethod.java b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/ConnectionMethod.java index f1166612db4a..94049899a7e7 100644 --- a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/ConnectionMethod.java +++ b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/ConnectionMethod.java @@ -40,13 +40,13 @@ public final class ConnectionMethod { private static final Logger LOG = Logger.getLogger(ConnectionMethod.class.getName()); - private final static String PLAT_PROP_HOST = "platform.host"; //NOI18N - private final static String PLAT_PROP_PORT = "platform.port"; //NOI18N + private static final String PLAT_PROP_HOST = "platform.host"; //NOI18N + private static final String PLAT_PROP_PORT = "platform.port"; //NOI18N - public static abstract class Authentification { + public abstract static class Authentification { - private final static String PLAT_PROP_AUTH_KIND = "platform.auth.kind"; //NOI18N - private final static String PLAT_PROP_AUTH_USER = "platform.auth.username"; //NOI18N + private static final String PLAT_PROP_AUTH_KIND = "platform.auth.kind"; //NOI18N + private static final String PLAT_PROP_AUTH_USER = "platform.auth.username"; //NOI18N public static enum Kind { @@ -170,7 +170,7 @@ static void clear(@NonNull final String antPlatformName) { public static final class Password extends Authentification { - private final static String PLAT_PROP_AUTH_PASSWD = "platform.auth.passwd"; //NOI18N + private static final String PLAT_PROP_AUTH_PASSWD = "platform.auth.passwd"; //NOI18N private final String password; //TODO: Store in keystore @@ -206,8 +206,8 @@ static void clear(@NonNull final String antPlatformName) { public static final class Key extends Authentification { - private final static String PLAT_PROP_AUTH_KEYSTORE = "platform.auth.keystore"; //NOI18N - private final static String PLAT_PROP_AUTH_PASSPHRASE = "platform.auth.passphrase"; //NOI18N + private static final String PLAT_PROP_AUTH_KEYSTORE = "platform.auth.keystore"; //NOI18N + private static final String PLAT_PROP_AUTH_PASSPHRASE = "platform.auth.passphrase"; //NOI18N private final File keyStore; private final String passPhrase; //TODO: Store in keystore diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/DebianJavaPlatformDetector.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/DebianJavaPlatformDetector.java index 8ba95296752f..f1bcb2b9b2da 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/DebianJavaPlatformDetector.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/DebianJavaPlatformDetector.java @@ -34,8 +34,8 @@ * @author lkishalmi */ public class DebianJavaPlatformDetector implements Runnable { - final static File DEBIAN_JAVA_DIR = new File("/usr/lib/jvm"); //NOI18N - final static String JAVA_DIR_MATCHER = "java-(\\d+)-openjdk-(amd64|arm64|i386)"; //NOI18N + static final File DEBIAN_JAVA_DIR = new File("/usr/lib/jvm"); //NOI18N + static final String JAVA_DIR_MATCHER = "java-(\\d+)-openjdk-(amd64|arm64|i386)"; //NOI18N @Override public void run() { diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/SdkManJavaPlatformDetector.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/SdkManJavaPlatformDetector.java index 49109b76c25d..320d27fc8b15 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/SdkManJavaPlatformDetector.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/SdkManJavaPlatformDetector.java @@ -33,7 +33,7 @@ */ public class SdkManJavaPlatformDetector implements Runnable { - final static File SDKMAN_JAVA_DIR = new File(System.getProperty("user.home"), ".sdkman/candidates/java"); //NOI18N + static final File SDKMAN_JAVA_DIR = new File(System.getProperty("user.home"), ".sdkman/candidates/java"); //NOI18N @Override public void run() { diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java index 9cfa8306ccac..99d55277bd6e 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java @@ -219,7 +219,7 @@ public void setDisplayName(String name) { * of display name * @param name the new display name */ - final protected void internalSetDisplayName (String name) { + protected final void internalSetDisplayName (String name) { this.displayName = name; } diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java index 443e5086e2f9..032040df1534 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java @@ -498,8 +498,8 @@ public static class SourceReader extends InputStreamReader { private boolean inString = false; private boolean backslashLast = false; private boolean separatorLast = false; - static private final char separators[] = {'.'}; // dot is enough here... - static private final char whitespaces[] = {' ', '\t', '\r', '\n'}; + private static final char separators[] = {'.'}; // dot is enough here... + private static final char whitespaces[] = {' ', '\t', '\r', '\n'}; public SourceReader(InputStream in) { super(in); @@ -638,7 +638,7 @@ private int moveToChar(int c) throws IOException { return (cc == -1) ? -1 : 0; } - static private boolean isSeparator(int c) { + private static boolean isSeparator(int c) { for (int i=0; i < separators.length; i++) { if (c == separators[i]) { return true; @@ -647,7 +647,7 @@ static private boolean isSeparator(int c) { return false; } - static private boolean isWhitespace(int c) { + private static boolean isWhitespace(int c) { for (int i=0; i < whitespaces.length; i++) { if (c == whitespaces[i]) { return true; diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/QueriesCache.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/QueriesCache.java index e651da83a3e5..8c660331b490 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/QueriesCache.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/QueriesCache.java @@ -190,7 +190,7 @@ static synchronized QueriesCache getSources() { return sources; } - static abstract class ResultBase { + abstract static class ResultBase { private final ChangeSupport cs = new ChangeSupport(this); public void addChangeListener(@NonNull final ChangeListener l) { diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/jarloader/JarDataNode.java b/java/java.j2seplatform/src/org/netbeans/modules/java/jarloader/JarDataNode.java index 3ff765eb010d..b87aceebb939 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/jarloader/JarDataNode.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/jarloader/JarDataNode.java @@ -80,7 +80,7 @@ private static Children childrenFor(FileObject jar) { * So, in order to fix #83595, here is a little hack that schedules * replacement of this dummy children on addNotify call. */ - final static class DummyChildren extends Children implements Runnable { + static final class DummyChildren extends Children implements Runnable { private JarDataNode node; diff --git a/java/java.j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectPlatformTest.java b/java/java.j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectPlatformTest.java index afd451e86c61..320d488466bc 100644 --- a/java/java.j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectPlatformTest.java +++ b/java/java.j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/api/J2SEProjectPlatformTest.java @@ -125,7 +125,7 @@ public void propertyChange(PropertyChangeEvent evt) { - private final static class MockJavaPlatformProvider implements JavaPlatformProvider { + private static final class MockJavaPlatformProvider implements JavaPlatformProvider { private static final MockJavaPlatformProvider INSTANCE = new MockJavaPlatformProvider(); diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/Processes.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/Processes.java index c7a045d5e7aa..716656265e8a 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/Processes.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/Processes.java @@ -182,7 +182,7 @@ private static List getProcesses(String cmd, } } - final static class ProcessInfo { + static final class ProcessInfo { private final long pid; private final String executable; diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Browser.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Browser.java index 0ad2c6eebef0..f9ac76e6352d 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Browser.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Browser.java @@ -215,7 +215,7 @@ public final void displayPage(URL page, Runnable onPageLoad) { * to {@link Browser#Browser(org.netbeans.html.presenters.browser.Browser.Config) } * constructor. */ - public final static class Config implements Cloneable { + public static final class Config implements Cloneable { private Consumer browser; Integer port; boolean debug = Boolean.getBoolean("com.dukescript.presenters.browserDebug"); diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Buttons.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Buttons.java index c5489918e5eb..279650a8f661 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Buttons.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/Buttons.java @@ -62,7 +62,7 @@ private Buttons() { + "footer.appendChild(button);\n" + "return button;\n" ) - public native static Object createButton0(String id, HTMLViewerSpi.Context callback); + public static native Object createButton0(String id, HTMLViewerSpi.Context callback); static void clickButton0(String id, Object callback) { HTMLViewerSpi.Context ctx = (HTMLViewerSpi.Context) callback; @@ -70,12 +70,12 @@ static void clickButton0(String id, Object callback) { } @JavaScriptBody(args = { "b" }, body = "return b.id;") - public native static String buttonName0(Object b); + public static native String buttonName0(Object b); @JavaScriptBody(args = { "b", "text" }, body = "b.innerHTML = text;") - public native static void buttonText0(Object b, String text); + public static native void buttonText0(Object b, String text); @JavaScriptBody(args = { "b", "disabled" }, body = "return b.disabled = disabled;") - public native static String buttonDisabled0(Object b, boolean disabled); + public static native String buttonDisabled0(Object b, boolean disabled); } diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/HttpServer.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/HttpServer.java index 8f6fa86fb5cb..bd24cd5363d1 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/HttpServer.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/htmlui/HttpServer.java @@ -52,11 +52,11 @@ abstract class HttpServer { abstract Runner initializeRunner(String id); abstract void runSafe(Runner runner, Runnable code, Fn.Presenter presenter); - static abstract class Handler { + abstract static class Handler { abstract void service(HttpServer server, Request rqst, Response rspns) throws IOException; } - static abstract class WebSocketApplication { + abstract static class WebSocketApplication { abstract void onMessage(HttpServer server, WebSocket socket, String text); } } diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java index 103fc477310d..c2ccd5b05687 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java @@ -950,7 +950,7 @@ public synchronized void finished(boolean ok) { checkStatus(); } - synchronized final void checkStatus() { + final synchronized void checkStatus() { if (running == 0) { try { wait(100); diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ui/AbstractGlobalActionContext.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ui/AbstractGlobalActionContext.java index e850dba7ba8b..e111f78b6eaf 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ui/AbstractGlobalActionContext.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ui/AbstractGlobalActionContext.java @@ -38,7 +38,7 @@ public class AbstractGlobalActionContext implements ContextGlobalProvider, Looku /** * Holder class that is inserted & looked up in the default Lookup. */ - final static class ContextHolder { + static final class ContextHolder { final Lookup context; public ContextHolder(Lookup context) { diff --git a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/explorer/TreeViewProviderTest.java b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/explorer/TreeViewProviderTest.java index 9298304e428f..1da22024e2f5 100644 --- a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/explorer/TreeViewProviderTest.java +++ b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/explorer/TreeViewProviderTest.java @@ -154,7 +154,7 @@ public void getNodeIdRegistersParents() throws Exception { assertNotNull(map.get(grandParentId)); } - final static class TreeViewProviderImpl extends TreeViewProvider { + static final class TreeViewProviderImpl extends TreeViewProvider { private Set changed = new HashSet<>(); TreeViewProviderImpl(ExplorerManager em, TreeNodeRegistry r) { diff --git a/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteLogicalView.java b/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteLogicalView.java index 06a78ee6814b..b0e698604245 100644 --- a/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteLogicalView.java +++ b/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteLogicalView.java @@ -197,7 +197,7 @@ public void stateChanged(ChangeEvent e) { refresh(false); } - private static abstract class Key { + private abstract static class Key { public final Group group; public Key(Group group) { diff --git a/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/actions/Processes.java b/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/actions/Processes.java index 2604129c0cc3..59a3b5bc8516 100644 --- a/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/actions/Processes.java +++ b/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/actions/Processes.java @@ -182,7 +182,7 @@ private static List getProcesses(String cmd, } } - final static class ProcessInfo { + static final class ProcessInfo { private final long pid; private final String executable; diff --git a/java/java.navigation/src/org/netbeans/modules/java/navigation/JavadocTopComponent.java b/java/java.navigation/src/org/netbeans/modules/java/navigation/JavadocTopComponent.java index 3e9d31d5107d..ca36b0938e37 100644 --- a/java/java.navigation/src/org/netbeans/modules/java/navigation/JavadocTopComponent.java +++ b/java/java.navigation/src/org/netbeans/modules/java/navigation/JavadocTopComponent.java @@ -171,7 +171,7 @@ protected String preferredID() { return PREFERRED_ID; } - final static class ResolvableHelper implements Serializable { + static final class ResolvableHelper implements Serializable { private static final long serialVersionUID = 1L; public Object readResolve() { return JavadocTopComponent.getDefault(); diff --git a/java/java.navigation/src/org/netbeans/modules/java/navigation/base/Filters.java b/java/java.navigation/src/org/netbeans/modules/java/navigation/base/Filters.java index 074ec6722eca..1fb14e5759b8 100644 --- a/java/java.navigation/src/org/netbeans/modules/java/navigation/base/Filters.java +++ b/java/java.navigation/src/org/netbeans/modules/java/navigation/base/Filters.java @@ -103,7 +103,7 @@ public final JComponent getComponent() { return fm.getComponent(buttons); } - public synchronized final FiltersManager getFiltersManager() { + public final synchronized FiltersManager getFiltersManager() { if (filtersManager == null) { filtersManager = createFilters(); } diff --git a/java/java.navigation/src/org/netbeans/modules/java/stackanalyzer/AnalyzeStackTopComponent.java b/java/java.navigation/src/org/netbeans/modules/java/stackanalyzer/AnalyzeStackTopComponent.java index 6d089f42e238..52010e435f07 100644 --- a/java/java.navigation/src/org/netbeans/modules/java/stackanalyzer/AnalyzeStackTopComponent.java +++ b/java/java.navigation/src/org/netbeans/modules/java/stackanalyzer/AnalyzeStackTopComponent.java @@ -312,7 +312,7 @@ public HelpCtx getHelpCtx() { } - final static class ResolvableHelper implements Serializable { + static final class ResolvableHelper implements Serializable { private static final long serialVersionUID = 1L; diff --git a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/LogicalViewProviderImpl.java b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/LogicalViewProviderImpl.java index a43147759147..d4fd90bce8df 100644 --- a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/LogicalViewProviderImpl.java +++ b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/LogicalViewProviderImpl.java @@ -222,7 +222,7 @@ public void stateChanged(ChangeEvent e) { refresh(false); } - private static abstract class Key { + private abstract static class Key { public final SourceGroup group; public Key(SourceGroup group) { diff --git a/java/java.platform.ui/src/org/netbeans/modules/java/platform/PlatformSettings.java b/java/java.platform.ui/src/org/netbeans/modules/java/platform/PlatformSettings.java index 886b2fdec5d3..2ce94ea61103 100644 --- a/java/java.platform.ui/src/org/netbeans/modules/java/platform/PlatformSettings.java +++ b/java/java.platform.ui/src/org/netbeans/modules/java/platform/PlatformSettings.java @@ -89,7 +89,7 @@ public void setPlatformsFolder (File file) { } - public synchronized static PlatformSettings getDefault () { + public static synchronized PlatformSettings getDefault () { return INSTANCE; } } diff --git a/java/java.preprocessorbridge/src/org/netbeans/modules/java/preprocessorbridge/spi/JavaSourceUtilImpl.java b/java/java.preprocessorbridge/src/org/netbeans/modules/java/preprocessorbridge/spi/JavaSourceUtilImpl.java index e7dd19f4771a..eea307a3e919 100644 --- a/java/java.preprocessorbridge/src/org/netbeans/modules/java/preprocessorbridge/spi/JavaSourceUtilImpl.java +++ b/java/java.preprocessorbridge/src/org/netbeans/modules/java/preprocessorbridge/spi/JavaSourceUtilImpl.java @@ -72,7 +72,7 @@ protected Map generate(@NonNull FileObject root, @NonNull FileOb @CheckForNull protected abstract ModuleInfoHandle getModuleInfoHandle(@NonNull Object javaSource) throws IOException; - public static abstract class ModuleInfoHandle { + public abstract static class ModuleInfoHandle { @CheckForNull public abstract String parseModuleName() throws IOException; diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java index 9f39b5c81540..48998f27ef6e 100644 --- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java +++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java @@ -603,7 +603,7 @@ private enum RefType { // - private static abstract class BaseResolver implements ProjectProblemResolver { + private abstract static class BaseResolver implements ProjectProblemResolver { protected final RefType type; protected final String id; @@ -815,7 +815,7 @@ public Future resolve() { } } - private static abstract class ReferenceResolver extends BaseResolver { + private abstract static class ReferenceResolver extends BaseResolver { static File lastSelectedFile; diff --git a/java/java.source.base/src/org/netbeans/api/java/source/CodeStyle.java b/java/java.source.base/src/org/netbeans/api/java/source/CodeStyle.java index 4fc0a26829c9..1e8859b949d6 100644 --- a/java/java.source.base/src/org/netbeans/api/java/source/CodeStyle.java +++ b/java/java.source.base/src/org/netbeans/api/java/source/CodeStyle.java @@ -91,7 +91,7 @@ public static CodeStyle getDefault(Project project) { * * @since 0.39 */ - public synchronized static CodeStyle getDefault(FileObject file) { + public static synchronized CodeStyle getDefault(FileObject file) { Preferences prefs = CodeStylePreferences.get(file, JavacParser.MIME_TYPE).getPreferences(); return FmtOptions.codeStyleProducer.create(prefs); } @@ -107,7 +107,7 @@ public synchronized static CodeStyle getDefault(FileObject file) { * * @since 0.39 */ - public synchronized static CodeStyle getDefault(Document doc) { + public static synchronized CodeStyle getDefault(Document doc) { Preferences prefs = CodeStylePreferences.get(doc, JavacParser.MIME_TYPE).getPreferences(); return FmtOptions.codeStyleProducer.create(prefs); } diff --git a/java/java.source.base/src/org/netbeans/api/java/source/ScanUtils.java b/java/java.source.base/src/org/netbeans/api/java/source/ScanUtils.java index 52f2f5b0278b..ebd42a61a74e 100644 --- a/java/java.source.base/src/org/netbeans/api/java/source/ScanUtils.java +++ b/java/java.source.base/src/org/netbeans/api/java/source/ScanUtils.java @@ -412,7 +412,7 @@ private static Future postUserTask( */ private static final ThreadLocal retryGuard = new ThreadLocal(); - private final static class FinishedFuture implements Future { + private static final class FinishedFuture implements Future { @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; diff --git a/java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java b/java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java index 5f34aa30e5e5..6cd772847c1b 100644 --- a/java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java +++ b/java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java @@ -650,7 +650,7 @@ private static FileObject findSource (final String binaryName, final FileObject. return null; } - private static abstract class Match { + private abstract static class Match { private final String name; diff --git a/java/java.source.base/src/org/netbeans/api/java/source/support/ProfileSupport.java b/java/java.source.base/src/org/netbeans/api/java/source/support/ProfileSupport.java index 8228d961a566..38e437174813 100644 --- a/java/java.source.base/src/org/netbeans/api/java/source/support/ProfileSupport.java +++ b/java/java.source.base/src/org/netbeans/api/java/source/support/ProfileSupport.java @@ -377,7 +377,7 @@ boolean isCancelled() { } - private static abstract class Validator implements Runnable { + private abstract static class Validator implements Runnable { protected final Context context; protected final URL root; @@ -475,7 +475,7 @@ static Validator forBinary( return new BinaryValidator(root, context); } - private final static class BinaryValidator extends Validator { + private static final class BinaryValidator extends Validator { private BinaryValidator( @NonNull final URL root, @@ -552,7 +552,7 @@ private Union2 findProfileInManifest(@NonNull URL root) { } - private final static class SourceValidator extends Validator { + private static final class SourceValidator extends Validator { private final File cacheRoot; private final ClasspathInfo resolveCps; diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java index 7ffe4a2e4cc3..866102932774 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java @@ -1438,7 +1438,7 @@ public boolean isTypeOf(String mimeType) { } } - private static abstract class Check implements Callable { + private abstract static class Check implements Callable { protected final Context ctx; diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaFileFilterListener.java b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaFileFilterListener.java index 6316d9af9440..aa3307cccaae 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaFileFilterListener.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaFileFilterListener.java @@ -123,7 +123,7 @@ private boolean verify(final URL root) throws IOException, URISyntaxException { } return result; } - synchronized static JavaFileFilterListener getDefault() { + static synchronized JavaFileFilterListener getDefault() { if (instance == null) { instance = new JavaFileFilterListener(); } diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaIndexerWorker.java b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaIndexerWorker.java index d8eaf39006d6..551fcd8394d7 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaIndexerWorker.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaIndexerWorker.java @@ -178,7 +178,7 @@ public Boolean apply( } } - private static abstract class SuspendableIterator implements Iterator { + private abstract static class SuspendableIterator implements Iterator { private final SuspendStatus suspendStatus; diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/TransactionContext.java b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/TransactionContext.java index 9d2448224372..6a796bfef613 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/indexing/TransactionContext.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/indexing/TransactionContext.java @@ -229,7 +229,7 @@ public static TransactionContext beginStandardTransaction( /** * Transaction service which can be registered into the {@link TransactionContext}. */ - public static abstract class Service { + public abstract static class Service { /** * Called to commit changes done during the transaction. * @throws IOException in case of IO error. diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/CachingArchive.java b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/CachingArchive.java index cab1fff46b47..6c5f584c0be1 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/CachingArchive.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/CachingArchive.java @@ -66,7 +66,7 @@ public class CachingArchive implements Archive, FileChangeListener { //@GuardedBy("this") byte[] names;// = new byte[16384]; private int nameOffset = 0; - final static int[] EMPTY = new int[0]; + static final int[] EMPTY = new int[0]; //@GuardedBy("this") private Map folders; private volatile Boolean multiRelease; diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/FileObjects.java b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/FileObjects.java index 1208cf76dbb5..e0fde2520713 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/FileObjects.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/FileObjects.java @@ -1012,7 +1012,7 @@ private static String getSimpleName( String fileName ) { // // - public static abstract class Base implements InferableJavaFileObject { + public abstract static class Base implements InferableJavaFileObject { protected final JavaFileObject.Kind kind; protected final String pkgName; @@ -1163,7 +1163,7 @@ private static String[] getNameExtPair (String name) { } } - public static abstract class PrefetchableBase extends Base implements PrefetchableJavaFileObject { + public abstract static class PrefetchableBase extends Base implements PrefetchableJavaFileObject { private volatile CharSequence data; @@ -1348,7 +1348,7 @@ protected CharSequence getCharContentImpl(boolean ignoreEncodingErrors) throws I } } - private static abstract class PathBase extends Base { + private abstract static class PathBase extends Base { private volatile URI uriCache; diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/SourceFileManager.java b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/SourceFileManager.java index 39a89cd8675f..6344221a9b6a 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/SourceFileManager.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/SourceFileManager.java @@ -339,7 +339,7 @@ public boolean isModified(@NonNull final URI file) { } } - public static abstract class ModifiedFilesTransaction extends TransactionContext.Service { + public abstract static class ModifiedFilesTransaction extends TransactionContext.Service { public abstract void cacheUpdated(@NonNull final URI file); abstract void begin(); } diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java b/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java index 8e69d00b8cd7..17cf4c060bbe 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java @@ -777,7 +777,7 @@ public int[] sectionRemovalBounds(StringBuilder replacement) { } - private static abstract class BaseEstimator extends PositionEstimator { + private abstract static class BaseEstimator extends PositionEstimator { JavaTokenId precToken; private ArrayList separatorList; diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/usages/BinaryAnalyser.java b/java/java.source.base/src/org/netbeans/modules/java/source/usages/BinaryAnalyser.java index 5111c32d6795..a632c0ca3fc0 100644 --- a/java/java.source.base/src/org/netbeans/modules/java/source/usages/BinaryAnalyser.java +++ b/java/java.source.base/src/org/netbeans/modules/java/source/usages/BinaryAnalyser.java @@ -155,7 +155,7 @@ private Changes ( } - public static abstract class Config { + public abstract static class Config { public enum UsagesLevel { BASIC("basic"), //NOI18N @@ -1147,7 +1147,7 @@ void visit(Variable v) { // // - private static abstract class RootProcessor { + private abstract static class RootProcessor { private static final Comparator,Long>> COMPARATOR = new Comparator,Long>>() { @Override public int compare( diff --git a/java/java.source.base/test/unit/src/org/netbeans/api/java/source/TestUtilities.java b/java/java.source.base/test/unit/src/org/netbeans/api/java/source/TestUtilities.java index d3be7ed3d989..3020799c3d61 100644 --- a/java/java.source.base/test/unit/src/org/netbeans/api/java/source/TestUtilities.java +++ b/java/java.source.base/test/unit/src/org/netbeans/api/java/source/TestUtilities.java @@ -137,7 +137,7 @@ public static void setCacheFolder (final File cacheFolder) { * @param f the file to be read * @return the contents of the file(s). */ - public final static String copyFileToString (java.io.File f) throws java.io.IOException { + public static final String copyFileToString (java.io.File f) throws java.io.IOException { int s = (int)f.length (); byte[] data = new byte[s]; int len = new FileInputStream (f).read (data); @@ -152,7 +152,7 @@ public final static String copyFileToString (java.io.File f) throws java.io.IOEx * @param f the file to be read * @return the contents of the file(s). */ - public final static String copyGZipFileToString (java.io.File f) throws java.io.IOException { + public static final String copyGZipFileToString (java.io.File f) throws java.io.IOException { GZIPInputStream is = new GZIPInputStream(new FileInputStream(f)); byte[] arr = new byte[256 * 256]; int first = 0; @@ -171,7 +171,7 @@ public final static String copyGZipFileToString (java.io.File f) throws java.io. * @param content the contents of the returned file. * @return the created file */ - public final static File copyStringToFile (File f, String content) throws Exception { + public static final File copyStringToFile (File f, String content) throws Exception { FileOutputStream os = new FileOutputStream(f); InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8")); FileUtil.copy(is, os); @@ -188,7 +188,7 @@ public final static File copyStringToFile (File f, String content) throws Except * @param content the contents of the returned file. * @return the created file */ - public final static FileObject copyStringToFile (FileObject f, String content) throws Exception { + public static final FileObject copyStringToFile (FileObject f, String content) throws Exception { OutputStream os = f.getOutputStream(); InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8")); FileUtil.copy(is, os); @@ -205,7 +205,7 @@ public final static FileObject copyStringToFile (FileObject f, String content) t * * @param urls to analyze */ - public final static void analyzeBinaries(final Collection urls) throws IOException { + public static final void analyzeBinaries(final Collection urls) throws IOException { final ClasspathInfo cpInfo = ClasspathInfo.create(EMPTY, EMPTY, EMPTY); final ClassIndexManager mgr = ClassIndexManager.getDefault(); final JavaSource js = JavaSource.create(cpInfo); diff --git a/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/parsing/IndexerTransactionTest.java b/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/parsing/IndexerTransactionTest.java index 7bf67d350bb2..9823c1c26043 100644 --- a/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/parsing/IndexerTransactionTest.java +++ b/java/java.source.base/test/unit/src/org/netbeans/modules/java/source/parsing/IndexerTransactionTest.java @@ -640,8 +640,8 @@ public ClassPath findClassPath(final FileObject file, final String type) { public static class SFBQImpl implements SourceForBinaryQueryImplementation { - final static Map map = new HashMap (); - final static Map results = new HashMap (); + static final Map map = new HashMap (); + static final Map results = new HashMap (); public SFBQImpl () { diff --git a/java/java.source/src/org/netbeans/api/java/source/support/CaretAwareJavaSourceTaskFactory.java b/java/java.source/src/org/netbeans/api/java/source/support/CaretAwareJavaSourceTaskFactory.java index 9515feda8700..e0b3d427ff9e 100644 --- a/java/java.source/src/org/netbeans/api/java/source/support/CaretAwareJavaSourceTaskFactory.java +++ b/java/java.source/src/org/netbeans/api/java/source/support/CaretAwareJavaSourceTaskFactory.java @@ -121,7 +121,7 @@ public List getFileObjects() { * @param file file from which the position should be found * @return caret position in the current {@link JTextComponent} for a given file. */ - public synchronized static int getLastPosition(FileObject file) { + public static synchronized int getLastPosition(FileObject file) { if (file == null) { throw new NullPointerException("Cannot pass null file!"); } @@ -136,7 +136,7 @@ public synchronized static int getLastPosition(FileObject file) { return position; } - synchronized static void setLastPosition(FileObject file, int position) { + static synchronized void setLastPosition(FileObject file, int position) { file2LastPosition.put(file, position); } diff --git a/java/java.source/src/org/netbeans/api/java/source/support/LookupBasedJavaSourceTaskFactory.java b/java/java.source/src/org/netbeans/api/java/source/support/LookupBasedJavaSourceTaskFactory.java index 7946a6ea58ff..0abfeba9191f 100644 --- a/java/java.source/src/org/netbeans/api/java/source/support/LookupBasedJavaSourceTaskFactory.java +++ b/java/java.source/src/org/netbeans/api/java/source/support/LookupBasedJavaSourceTaskFactory.java @@ -107,7 +107,7 @@ public LookupBasedJavaSourceTaskFactory( * * @param lookup new {@link Lookup} */ - protected synchronized final void setLookup(Lookup lookup) { + protected final synchronized void setLookup(Lookup lookup) { if (fileObjectResult != null) { fileObjectResult.removeLookupListener(listener); } diff --git a/java/java.source/src/org/netbeans/api/java/source/support/SelectionAwareJavaSourceTaskFactory.java b/java/java.source/src/org/netbeans/api/java/source/support/SelectionAwareJavaSourceTaskFactory.java index 804bea7896b8..b618e095bb1a 100644 --- a/java/java.source/src/org/netbeans/api/java/source/support/SelectionAwareJavaSourceTaskFactory.java +++ b/java/java.source/src/org/netbeans/api/java/source/support/SelectionAwareJavaSourceTaskFactory.java @@ -127,7 +127,7 @@ public List getFileObjects() { * @return selection span in the current {@link JTextComponent} for a given file. * null if no selection available so far. */ - public synchronized static int[] getLastSelection(FileObject file) { + public static synchronized int[] getLastSelection(FileObject file) { if (file == null) { throw new NullPointerException("Cannot pass null file!"); } @@ -143,7 +143,7 @@ public synchronized static int[] getLastSelection(FileObject file) { return new int[] {startPosition, endPosition}; } - private synchronized static void setLastSelection(FileObject file, int startPosition, int endPosition) { + private static synchronized void setLastSelection(FileObject file, int startPosition, int endPosition) { file2SelectionStartPosition.put(file, startPosition); file2SelectionEndPosition.put(file, endPosition); } diff --git a/java/java.source/src/org/netbeans/modules/java/IndentFileEntry.java b/java/java.source/src/org/netbeans/modules/java/IndentFileEntry.java index 8b3ea5bef4eb..4806411624dc 100644 --- a/java/java.source/src/org/netbeans/modules/java/IndentFileEntry.java +++ b/java/java.source/src/org/netbeans/modules/java/IndentFileEntry.java @@ -160,7 +160,7 @@ public FileObject createFromTemplate (FileObject f, String name) throws IOExcept } /** The prefix of all magic strings */ - private final static String MAGIC_PREFIX = "//GEN-"; // NOI18N + private static final String MAGIC_PREFIX = "//GEN-"; // NOI18N static String fixupGuardedBlocks(String indentedLine) { int offset = indentedLine.indexOf(MAGIC_PREFIX); diff --git a/java/java.source/src/org/netbeans/modules/java/JavaNode.java b/java/java.source/src/org/netbeans/modules/java/JavaNode.java index b99e7503b3ad..8399004da621 100644 --- a/java/java.source/src/org/netbeans/modules/java/JavaNode.java +++ b/java/java.source/src/org/netbeans/modules/java/JavaNode.java @@ -456,7 +456,7 @@ private static Image getImage( return result; } - private static abstract class IconTask implements Runnable { + private abstract static class IconTask implements Runnable { protected final JavaNode node; IconTask(@NonNull final JavaNode node) { diff --git a/java/java.source/src/org/netbeans/modules/java/ui/CategorySupport.java b/java/java.source/src/org/netbeans/modules/java/ui/CategorySupport.java index da8aed186dfb..1e9b5e93b08d 100644 --- a/java/java.source/src/org/netbeans/modules/java/ui/CategorySupport.java +++ b/java/java.source/src/org/netbeans/modules/java/ui/CategorySupport.java @@ -555,7 +555,7 @@ public String toString() { } } - static abstract class DocumentCategorySupport extends CategorySupport { + abstract static class DocumentCategorySupport extends CategorySupport { /** * Two Sources are used. While one Source document is displayed by the preview JEditorPane, * the other source may be formatted in the RP. The editor then switch between those sources. diff --git a/java/java.source/test/qa-functional/src/org/netbeans/test/java/Common.java b/java/java.source/test/qa-functional/src/org/netbeans/test/java/Common.java index c4d25e4142f9..cffbe578d10c 100644 --- a/java/java.source/test/qa-functional/src/org/netbeans/test/java/Common.java +++ b/java/java.source/test/qa-functional/src/org/netbeans/test/java/Common.java @@ -121,7 +121,7 @@ public static String concat(String s, int i){ * @param i * @return for i=1 "newMethod1" */ - static public String getMethodName(int i){ + public static String getMethodName(int i){ return concat(METHODS,i); } diff --git a/java/java.sourceui/src/org/netbeans/modules/java/source/ui/ElementOpenAccessor.java b/java/java.sourceui/src/org/netbeans/modules/java/source/ui/ElementOpenAccessor.java index 278937175226..41b479cfeb84 100644 --- a/java/java.sourceui/src/org/netbeans/modules/java/source/ui/ElementOpenAccessor.java +++ b/java/java.sourceui/src/org/netbeans/modules/java/source/ui/ElementOpenAccessor.java @@ -32,11 +32,11 @@ public abstract class ElementOpenAccessor { private static ElementOpenAccessor instance; - public synchronized static ElementOpenAccessor getInstance() { + public static synchronized ElementOpenAccessor getInstance() { return instance; } - public synchronized static void setInstance(ElementOpenAccessor instance) { + public static synchronized void setInstance(ElementOpenAccessor instance) { ElementOpenAccessor.instance = instance; } diff --git a/java/java.testrunner/src/org/netbeans/modules/java/testrunner/CommonTestUtil.java b/java/java.testrunner/src/org/netbeans/modules/java/testrunner/CommonTestUtil.java index 4910fd54ef83..b2ea4e0ffdbc 100644 --- a/java/java.testrunner/src/org/netbeans/modules/java/testrunner/CommonTestUtil.java +++ b/java/java.testrunner/src/org/netbeans/modules/java/testrunner/CommonTestUtil.java @@ -38,7 +38,7 @@ * @version 1.1 */ public class CommonTestUtil { - static private final String JAVA_SOURCES_SUFFIX = "java"; //NOI18N + private static final String JAVA_SOURCES_SUFFIX = "java"; //NOI18N /** */ diff --git a/java/javadoc/src/org/netbeans/modules/javadoc/JavadocModule.java b/java/javadoc/src/org/netbeans/modules/javadoc/JavadocModule.java index 7ab5eb2d18f2..7121edf174e4 100644 --- a/java/javadoc/src/org/netbeans/modules/javadoc/JavadocModule.java +++ b/java/javadoc/src/org/netbeans/modules/javadoc/JavadocModule.java @@ -35,13 +35,13 @@ public final class JavadocModule extends ModuleInstall { private static Collection floatingTopComponents; - public synchronized static void registerTopComponent(TopComponent tc) { + public static synchronized void registerTopComponent(TopComponent tc) { if (floatingTopComponents == null) floatingTopComponents = new LinkedList<>(); floatingTopComponents.add(tc); } - public synchronized static void unregisterTopComponent(TopComponent tc) { + public static synchronized void unregisterTopComponent(TopComponent tc) { if (floatingTopComponents == null) return; floatingTopComponents.remove(tc); diff --git a/java/javadoc/src/org/netbeans/modules/javadoc/hints/AddTagFix.java b/java/javadoc/src/org/netbeans/modules/javadoc/hints/AddTagFix.java index 19cc2e365875..de835b49a55b 100644 --- a/java/javadoc/src/org/netbeans/modules/javadoc/hints/AddTagFix.java +++ b/java/javadoc/src/org/netbeans/modules/javadoc/hints/AddTagFix.java @@ -146,9 +146,9 @@ protected DocTree getNewTag(TreeMaker make) { */ private static class TagComparator implements Comparator { - private final static int HIGHER = -1; - private final static int EQUAL = 0; - private final static int LOWER = 1; + private static final int HIGHER = -1; + private static final int EQUAL = 0; + private static final int LOWER = 1; @Override public int compare(DocTree t, DocTree t1) { diff --git a/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java b/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java index 7633d603c983..276aa41c6269 100644 --- a/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java +++ b/java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java @@ -92,7 +92,7 @@ private IndexBuilder() { * Get the default index builder instance. * It will start parsing asynch. */ - public synchronized static IndexBuilder getDefault() { + public static synchronized IndexBuilder getDefault() { if (INSTANCE != null) { return INSTANCE; } @@ -268,7 +268,7 @@ private String parseTitle(URL html) { return title != null? title.trim(): title; } - private synchronized static void scheduleTask() { + private static synchronized void scheduleTask() { if (task == null) { task = new RequestProcessor(IndexBuilder.class).create(getDefault()); // NOI18N } diff --git a/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12.java b/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12.java index 001ca4cdc534..723207650ad1 100644 --- a/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12.java +++ b/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12.java @@ -207,25 +207,25 @@ else if ( direction > 0 ) { /* These are constants for the inner class */ - static private final String STR_CLASS = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_CLASS" ); //NOI18N - static private final String STR_INTERFACE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_INTERFACE" ); //NOI18N - static private final String STR_EXCEPTION = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_EXCEPTION" ); //NOI18N - static private final String STR_CONSTRUCTOR = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_CONSTRUCTOR" ); //NOI18N - static private final String STR_METHOD = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_METHOD" ); //NOI18N - static private final String STR_ERROR = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_ERROR" ); //NOI18N - static private final String STR_VARIABLE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_VARIABLE" ); //NOI18N - static private final String STR_STATIC = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_STATIC" ); //NOI18N - static private final String STR_DASH = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_DASH" ); //NOI18N - static private final String STR_PACKAGE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_PACKAGE" ); //NOI18N + private static final String STR_CLASS = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_CLASS" ); //NOI18N + private static final String STR_INTERFACE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_INTERFACE" ); //NOI18N + private static final String STR_EXCEPTION = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_EXCEPTION" ); //NOI18N + private static final String STR_CONSTRUCTOR = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_CONSTRUCTOR" ); //NOI18N + private static final String STR_METHOD = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_METHOD" ); //NOI18N + private static final String STR_ERROR = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_ERROR" ); //NOI18N + private static final String STR_VARIABLE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_VARIABLE" ); //NOI18N + private static final String STR_STATIC = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_STATIC" ); //NOI18N + private static final String STR_DASH = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_DASH" ); //NOI18N + private static final String STR_PACKAGE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK12_PACKAGE" ); //NOI18N private static final String STR_ENUM = NbBundle.getMessage(SearchThreadJdk12.class, "JDK15_ENUM"); //NOI18N private static final String STR_ANNTYPE = NbBundle.getMessage(SearchThreadJdk12.class, "JDK15_ANNOTATION_TYPE"); //NOI18N - static private final int IN_BALAST = 0; - static private final int IN_DT = 1; - static private final int IN_AREF = 2; + private static final int IN_BALAST = 0; + private static final int IN_DT = 1; + private static final int IN_AREF = 2; // static private final int IN_B = 3; - static private final int IN_DESCRIPTION = 4; - static private final int IN_DESCRIPTION_SUFFIX = 5; + private static final int IN_DESCRIPTION = 4; + private static final int IN_DESCRIPTION_SUFFIX = 5; /** This inner class parses the JDK 1.2 Documentation index and returns * found indexItems. diff --git a/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12_japan.java b/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12_japan.java index a22aa9b84752..98753c6c89ae 100644 --- a/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12_japan.java +++ b/java/javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12_japan.java @@ -207,39 +207,39 @@ else if ( direction > 0 ) { /* These are constants for the inner class */ - static private final String STR_CLASS = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_CLASS" ); //NOI18N - static private final String STR_INTERFACE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_INTERFACE" ); //NOI18N - static private final String STR_EXCEPTION = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_EXCEPTION" ); //NOI18N - static private final String STR_CONSTRUCTOR = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_CONSTRUCTOR" ); //NOI18N - static private final String STR_METHOD = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_METHOD" ); //NOI18N - static private final String STR_ERROR = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_ERROR" ); //NOI18N - static private final String STR_VARIABLE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_VARIABLE" ); //NOI18N - static private final String STR_STATIC = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_STATIC" ); //NOI18N - static private final String STR_DASH = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_DASH" ); //NOI18N - static private final String STR_PACKAGE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_PACKAGE" ); //NOI18N + private static final String STR_CLASS = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_CLASS" ); //NOI18N + private static final String STR_INTERFACE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_INTERFACE" ); //NOI18N + private static final String STR_EXCEPTION = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_EXCEPTION" ); //NOI18N + private static final String STR_CONSTRUCTOR = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_CONSTRUCTOR" ); //NOI18N + private static final String STR_METHOD = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_METHOD" ); //NOI18N + private static final String STR_ERROR = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_ERROR" ); //NOI18N + private static final String STR_VARIABLE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_VARIABLE" ); //NOI18N + private static final String STR_STATIC = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_STATIC" ); //NOI18N + private static final String STR_DASH = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_DASH" ); //NOI18N + private static final String STR_PACKAGE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK12_PACKAGE" ); //NOI18N private static final String STR_ENUM = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK15_ENUM"); //NOI18N private static final String STR_ANNTYPE = NbBundle.getMessage(SearchThreadJdk12_japan.class, "JDK15_ANNOTATION_TYPE"); //NOI18N /* Same translations from JDK javadoc */ - static private final String STR_CLASS_LOC = "\u30AF\u30E9\u30B9"; //NOI18N - static private final String STR_INTERFACE_LOC = "\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9"; //NOI18N - static private final String STR_EXCEPTION_LOC = "\u4F8B\u5916"; //NOI18N - static private final String STR_CONSTRUCTOR_LOC = "\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF"; //NOI18N - static private final String STR_METHOD_LOC = "\u30E1\u30BD\u30C3\u30C9"; //NOI18N - static private final String STR_ERROR_LOC = "\u30A8\u30E9\u30FC"; //NOI18N - static private final String STR_VARIABLE_LOC = "\u5909\u6570"; //NOI18N - static private final String STR_STATIC_LOC = "static"; //NOI18N - static private final String STR_DASH_LOC = "-"; //NOI18N - static private final String STR_PACKAGE_LOC = "\u30D1\u30C3\u30B1\u30FC\u30B8"; //NOI18N + private static final String STR_CLASS_LOC = "\u30AF\u30E9\u30B9"; //NOI18N + private static final String STR_INTERFACE_LOC = "\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9"; //NOI18N + private static final String STR_EXCEPTION_LOC = "\u4F8B\u5916"; //NOI18N + private static final String STR_CONSTRUCTOR_LOC = "\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF"; //NOI18N + private static final String STR_METHOD_LOC = "\u30E1\u30BD\u30C3\u30C9"; //NOI18N + private static final String STR_ERROR_LOC = "\u30A8\u30E9\u30FC"; //NOI18N + private static final String STR_VARIABLE_LOC = "\u5909\u6570"; //NOI18N + private static final String STR_STATIC_LOC = "static"; //NOI18N + private static final String STR_DASH_LOC = "-"; //NOI18N + private static final String STR_PACKAGE_LOC = "\u30D1\u30C3\u30B1\u30FC\u30B8"; //NOI18N private static final String STR_ENUM_LOC = "\u5217\u6319\u578B"; //NOI18N private static final String STR_ANNTYPE_LOC = "\u6CE8\u91C8\u578B"; //NOI18N - static private final int IN_BALAST = 0; - static private final int IN_DT = 1; - static private final int IN_AREF = 2; + private static final int IN_BALAST = 0; + private static final int IN_DT = 1; + private static final int IN_AREF = 2; // static private final int IN_B = 3; - static private final int IN_DESCRIPTION = 4; - static private final int IN_DESCRIPTION_SUFFIX = 5; + private static final int IN_DESCRIPTION = 4; + private static final int IN_DESCRIPTION_SUFFIX = 5; /** This inner class parses the JDK 1.2 Documentation index and returns * found indexItems. diff --git a/java/jellytools.java/test/qa-functional/src/org/netbeans/jellytools/modules/form/FormEditorOperatorTest.java b/java/jellytools.java/test/qa-functional/src/org/netbeans/jellytools/modules/form/FormEditorOperatorTest.java index e275969912da..786e3fbd48dc 100644 --- a/java/jellytools.java/test/qa-functional/src/org/netbeans/jellytools/modules/form/FormEditorOperatorTest.java +++ b/java/jellytools.java/test/qa-functional/src/org/netbeans/jellytools/modules/form/FormEditorOperatorTest.java @@ -39,7 +39,7 @@ public class FormEditorOperatorTest extends JellyTestCase { private static final String SAMPLE_FRAME = "JFrameSample.java"; - public final static String[] tests = new String[]{ + public static final String[] tests = new String[]{ "testOpen", "testSourceButton", "testEditor", diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/editor/OverrideEditorActions.java b/java/jshell.support/src/org/netbeans/modules/jshell/editor/OverrideEditorActions.java index 94382c9dcb48..4f726bbf6504 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/editor/OverrideEditorActions.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/editor/OverrideEditorActions.java @@ -214,7 +214,7 @@ private static Action findDelegate(String id) { * They delegate to some action for the standard implementation, and * divert under certain conditions (i.e. caret in the editable area etc) */ - public static abstract class DelegatingAction extends BaseAction { + public abstract static class DelegatingAction extends BaseAction { /** * Action ID to delegate, by default the action ID itself */ diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/env/CompilerOptionsProvider.java b/java/jshell.support/src/org/netbeans/modules/jshell/env/CompilerOptionsProvider.java index 695a5f0fd987..5ecbd39fe583 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/env/CompilerOptionsProvider.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/env/CompilerOptionsProvider.java @@ -46,7 +46,7 @@ public Result getOptions(FileObject file) { return new R(jshe); } - final static class R extends Result { + static final class R extends Result { private final JShellEnvironment env; public R(JShellEnvironment env) { diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/env/SourceLevelProvider.java b/java/jshell.support/src/org/netbeans/modules/jshell/env/SourceLevelProvider.java index ef2449241837..1a0a79c8ab42 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/env/SourceLevelProvider.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/env/SourceLevelProvider.java @@ -44,7 +44,7 @@ public Result getSourceLevel(FileObject javaFile) { return new R(jshe); } - final static class R implements Result { + static final class R implements Result { private final JShellEnvironment jshe; public R(JShellEnvironment jshe) { diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/launch/NIOStreams.java b/java/jshell.support/src/org/netbeans/modules/jshell/launch/NIOStreams.java index b7dc64d654a5..6242b19ecc2a 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/launch/NIOStreams.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/launch/NIOStreams.java @@ -241,7 +241,7 @@ public void run() { * Simple implementation of Output, which will block until the SocketChannel * does not accept all the data to be sent. */ - private final static class Output extends OutputStream { + private static final class Output extends OutputStream { private final SocketChannel channel; private final Selector selector; private final int timeout; diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/navigation/NavigationTask.java b/java/jshell.support/src/org/netbeans/modules/jshell/navigation/NavigationTask.java index 8d4fc817cc4d..ef2f86b1b0a0 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/navigation/NavigationTask.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/navigation/NavigationTask.java @@ -71,7 +71,7 @@ public void cancel() { } @MimeRegistration(service = TaskFactory.class, mimeType = "text/x-repl") - public final static class Factory extends TaskFactory { + public static final class Factory extends TaskFactory { @Override public Collection create(Snapshot snapshot) { diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/support/PersistentSnippetsSupport.java b/java/jshell.support/src/org/netbeans/modules/jshell/support/PersistentSnippetsSupport.java index 69be3cad446b..c6504ca90f30 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/support/PersistentSnippetsSupport.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/support/PersistentSnippetsSupport.java @@ -368,7 +368,7 @@ public void run(CompilationController ctrl) throws Exception { session.clearInputAndEvaluateExternal(execCommands, scriptFile.getName()); } - final static class ProjectSnippetsFolder extends SnippetsFolder implements PropertyChangeListener { + static final class ProjectSnippetsFolder extends SnippetsFolder implements PropertyChangeListener { final SnippetStorage projectStorage; final Project project; diff --git a/java/junit/src/org/netbeans/modules/junit/TestGeneratorSetup.java b/java/junit/src/org/netbeans/modules/junit/TestGeneratorSetup.java index 30b09790374f..a8a544cafcc8 100644 --- a/java/junit/src/org/netbeans/modules/junit/TestGeneratorSetup.java +++ b/java/junit/src/org/netbeans/modules/junit/TestGeneratorSetup.java @@ -49,13 +49,13 @@ public final class TestGeneratorSetup implements TestabilityJudge { /* the class is final only for performance reasons */ /* attributes - private */ - static private final String JUNIT_SUPER_CLASS_NAME = "TestCase"; - static private final String JUNIT_FRAMEWORK_PACKAGE_NAME = "junit.framework"; + private static final String JUNIT_SUPER_CLASS_NAME = "TestCase"; + private static final String JUNIT_FRAMEWORK_PACKAGE_NAME = "junit.framework"; - static private final String METHOD_NAME_SETUP = "setUp"; //NOI18N - static private final String METHOD_NAME_TEARDOWN = "tearDown"; //NOI18N - static private final String CLASS_COMMENT_LINE1 = "TestCreator.javaClass.addTestsHereComment.l1"; - static private final String CLASS_COMMENT_LINE2 = "TestCreator.javaClass.addTestsHereComment.l2"; + private static final String METHOD_NAME_SETUP = "setUp"; //NOI18N + private static final String METHOD_NAME_TEARDOWN = "tearDown"; //NOI18N + private static final String CLASS_COMMENT_LINE1 = "TestCreator.javaClass.addTestsHereComment.l1"; + private static final String CLASS_COMMENT_LINE2 = "TestCreator.javaClass.addTestsHereComment.l2"; /** should test classes be skipped during generation of tests? */ private boolean skipTestClasses = true; diff --git a/java/junit/src/org/netbeans/modules/junit/api/JUnitTestUtil.java b/java/junit/src/org/netbeans/modules/junit/api/JUnitTestUtil.java index 9f416db41d99..f7aefa167d40 100644 --- a/java/junit/src/org/netbeans/modules/junit/api/JUnitTestUtil.java +++ b/java/junit/src/org/netbeans/modules/junit/api/JUnitTestUtil.java @@ -63,30 +63,30 @@ * @version 1.1 */ public class JUnitTestUtil extends CommonTestUtil { - static private final String JAVA_SOURCES_SUFFIX = "java"; + private static final String JAVA_SOURCES_SUFFIX = "java"; private static final String JAVA_MIME_TYPE = "text/x-java"; //NOI18N - static private String getTestClassSuffix() { + private static String getTestClassSuffix() { return JUnitSettings.TEST_CLASSNAME_SUFFIX; } - static private String getIntegrationTestSuffix() { + private static String getIntegrationTestSuffix() { return JUnitSettings.INTEGRATION_TEST_CLASSNAME_SUFFIX; } - static private String getTestClassPrefix() { + private static String getTestClassPrefix() { return JUnitSettings.TEST_CLASSNAME_PREFIX; } - static private String getTestSuiteSuffix() { + private static String getTestSuiteSuffix() { return JUnitSettings.SUITE_CLASSNAME_SUFFIX; } - static private String getTestSuitePrefix() { + private static String getTestSuitePrefix() { return JUnitSettings.SUITE_CLASSNAME_PREFIX; } - static private String getRootSuiteName() { + private static String getRootSuiteName() { return JUnitSettings.getDefault().getRootSuiteClassName(); } @@ -441,7 +441,7 @@ public static List getJavaFileNames(FileObject packageFolder, ClasspathI // return cls.getInnerClass(name, false); // } - static public String createNewName(int i, Set usedNames) { + public static String createNewName(int i, Set usedNames) { String ret; do { ret = "p" + i++; diff --git a/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/AgentWorker.java b/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/AgentWorker.java index 269819f2a26c..d618be80083a 100644 --- a/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/AgentWorker.java +++ b/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/AgentWorker.java @@ -101,7 +101,7 @@ public class AgentWorker extends RemoteExecutionControl implements Executor, Run * Threads which execute user code, keyed by agent's socket local port. */ // @GuardedBy(self) - private final static Map userCodeExecutingThreads = new HashMap(); + private static final Map userCodeExecutingThreads = new HashMap(); private AgentWorker() { agent = null; diff --git a/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/NbJShellAgent.java b/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/NbJShellAgent.java index 2fccafd69dfc..6f01b45c122c 100644 --- a/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/NbJShellAgent.java +++ b/java/lib.jshell.agent/agentsrc/org/netbeans/lib/jshell/agent/NbJShellAgent.java @@ -69,7 +69,7 @@ public class NbJShellAgent implements Runnable, ClassFileTransformer { * This field will be initialized at startup. The IDE will grab the value * using JDI to associate a debugger Session with the appropriate incoming socket. */ - public volatile static String debuggerKey = ""; // NOI18N + public static volatile String debuggerKey = ""; // NOI18N private static final Logger LOG = Logger.getLogger(NbJShellAgent.class.getName()); diff --git a/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java b/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java index 965b252c6578..b9e9d9e8817b 100644 --- a/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java +++ b/java/maven.grammar/src/org/netbeans/modules/maven/codegen/NewMirrorPanel.java @@ -56,10 +56,10 @@ public class NewMirrorPanel extends javax.swing.JPanel { private SettingsModel model; private NotificationLineSupport nls; - private final static String ALL = "*"; //2.0.5+ //NOI18N - private final static String ALL_NON_LOCAL = "external:*"; //2.0.9+ //NOI18N - private final static String ALL_BUT_FOO = "*,!foo"; //2.0.9+ //NOI18N - private final static String LIST = "foo,bar"; //2.0.9+ //NOI18N + private static final String ALL = "*"; //2.0.5+ //NOI18N + private static final String ALL_NON_LOCAL = "external:*"; //2.0.9+ //NOI18N + private static final String ALL_BUT_FOO = "*,!foo"; //2.0.9+ //NOI18N + private static final String LIST = "foo,bar"; //2.0.9+ //NOI18N private final String[] MIRROROFS = new String[] { RepositorySystem.DEFAULT_REMOTE_REPO_ID, diff --git a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryPreferences.java b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryPreferences.java index d1573c8fecc8..8ce3bbe30606 100644 --- a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryPreferences.java +++ b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryPreferences.java @@ -101,7 +101,7 @@ private static Preferences storage() { return NbPreferences.root().node("org/netbeans/modules/maven/repositories"); } - public synchronized static RepositoryPreferences getInstance() { + public static synchronized RepositoryPreferences getInstance() { if (instance == null) { instance = new RepositoryPreferences(); } diff --git a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryQueries.java b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryQueries.java index 9c36af633ff4..4a6d048fa384 100644 --- a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryQueries.java +++ b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/api/RepositoryQueries.java @@ -66,7 +66,7 @@ public final class RepositoryQueries { * @param * @since 2.9 */ - public final static class Result { + public static final class Result { private final ResultImplementation impl; /** @@ -120,7 +120,7 @@ public int getReturnedResultCount() { } } - private final static class CompositeResult implements ResultImplementation { + private static final class CompositeResult implements ResultImplementation { private final List> results; @@ -179,7 +179,7 @@ public int getReturnedResultCount() { /** * One usage result. */ - public final static class ClassUsage { + public static final class ClassUsage { private final NBVersionInfo artifact; private final Set classes; public ClassUsage(NBVersionInfo artifact, Set classes) { diff --git a/java/maven.indexer/test/unit/src/org/netbeans/modules/maven/indexer/api/AbstractTestQueryProvider.java b/java/maven.indexer/test/unit/src/org/netbeans/modules/maven/indexer/api/AbstractTestQueryProvider.java index df1611886f47..d26dbd0aae13 100644 --- a/java/maven.indexer/test/unit/src/org/netbeans/modules/maven/indexer/api/AbstractTestQueryProvider.java +++ b/java/maven.indexer/test/unit/src/org/netbeans/modules/maven/indexer/api/AbstractTestQueryProvider.java @@ -85,7 +85,7 @@ public boolean handlesRepository(RepositoryInfo repo) { return false; } - abstract protected String getID(); + protected abstract String getID(); @Override public ArchetypeQueries getArchetypeQueries() { diff --git a/java/maven/src/org/netbeans/modules/maven/ActionProviderImpl.java b/java/maven/src/org/netbeans/modules/maven/ActionProviderImpl.java index 517744a599cb..5091e42a8025 100644 --- a/java/maven/src/org/netbeans/modules/maven/ActionProviderImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/ActionProviderImpl.java @@ -521,7 +521,7 @@ public static Action createCustomMavenAction(String name, NetbeansActionMapping return new CustomAction(name, mapping, showUI, context, project); } - private final static class CustomAction extends AbstractAction { + private static final class CustomAction extends AbstractAction { private final NetbeansActionMapping mapping; private final boolean showUI; @@ -625,7 +625,7 @@ private ModelRunConfig createCustomRunConfig(M2ConfigProvider conf) { } // XXX should this be an API somewhere? - private static abstract class ConditionallyShownAction extends AbstractAction implements ContextAwareAction { + private abstract static class ConditionallyShownAction extends AbstractAction implements ContextAwareAction { protected boolean triggeredOnFile = false; protected boolean triggeredOnPom = false; diff --git a/java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java b/java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java index 2978382ead7a..4b9a23a18638 100644 --- a/java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java @@ -204,7 +204,7 @@ public Model getRawModel() throws ModelBuildingException { } - public static abstract class WatcherAccessor { + public abstract static class WatcherAccessor { public abstract NbMavenProject createWatcher(NbMavenProjectImpl proj); diff --git a/java/maven/src/org/netbeans/modules/maven/actions/CreateLibraryAction.java b/java/maven/src/org/netbeans/modules/maven/actions/CreateLibraryAction.java index 19f5ae687546..e70445166690 100644 --- a/java/maven/src/org/netbeans/modules/maven/actions/CreateLibraryAction.java +++ b/java/maven/src/org/netbeans/modules/maven/actions/CreateLibraryAction.java @@ -75,7 +75,7 @@ public class CreateLibraryAction extends AbstractAction implements LookupListener { private final Lookup lookup; private final Lookup.Result result; - private final static @StaticResource String LIBRARIES_ICON = "org/netbeans/modules/maven/actions/libraries.gif";; + private static final @StaticResource String LIBRARIES_ICON = "org/netbeans/modules/maven/actions/libraries.gif";; private boolean createRunning; @Messages("ACT_Library=Create Library") diff --git a/java/maven/src/org/netbeans/modules/maven/api/customizer/support/ReflectionTextComponentUpdater.java b/java/maven/src/org/netbeans/modules/maven/api/customizer/support/ReflectionTextComponentUpdater.java index e44858713614..8c9a89d7c51b 100644 --- a/java/maven/src/org/netbeans/modules/maven/api/customizer/support/ReflectionTextComponentUpdater.java +++ b/java/maven/src/org/netbeans/modules/maven/api/customizer/support/ReflectionTextComponentUpdater.java @@ -141,7 +141,7 @@ public void setValue(String value) { } - public static abstract class Operation implements ModelOperation { + public abstract static class Operation implements ModelOperation { boolean isValueSet = false; private String newValue; diff --git a/java/maven/src/org/netbeans/modules/maven/api/output/OutputUtils.java b/java/maven/src/org/netbeans/modules/maven/api/output/OutputUtils.java index 011d70fb8288..88a8e09a2b38 100644 --- a/java/maven/src/org/netbeans/modules/maven/api/output/OutputUtils.java +++ b/java/maven/src/org/netbeans/modules/maven/api/output/OutputUtils.java @@ -146,7 +146,7 @@ public StacktraceAttributes(String method, String file, String lineNum) { } } - private static abstract class StacktraceOutputListener implements OutputListener { + private abstract static class StacktraceOutputListener implements OutputListener { protected abstract ClassPath getClassPath(); diff --git a/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java b/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java index 0be2ffd6e1a3..c6a7db415a8d 100644 --- a/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/classpath/ClassPathProviderImpl.java @@ -76,25 +76,25 @@ public final class ClassPathProviderImpl implements ClassPathProvider, ActiveJ2S private final @NonNull Project proj; - private final static int SOURCE_PATH = 0; // TEST_SOURCE_PATH = 1 - private final static int COMPILE_TIME_PATH = 2; // TEST_COMPILE_TIME_PATH = 3 - private final static int RUNTIME_PATH = 4; // TEST_RUNTIME_PATH = 5 - private final static int BOOT_PATH = 6; // TEST_BOOT_PATH = 7 - private final static int ENDORSED_PATH = 8; - private final static int MODULE_BOOT_PATH = 9; - private final static int MODULE_COMPILE_PATH = 10; // TEST_MODULE_COMPILE_PATH = 11 - private final static int MODULE_LEGACY_PATH = 12; // TEST_MODULE_LEGACY_PATH = 13 - - private final static int MODULE_EXECUTE_PATH = 14; // TEST_MODULE_EXECUTE_PATH = 15 - private final static int MODULE_EXECUTE_CLASS_PATH = 16; // TEST_MODULE_EXECUTE_CLASS_PATH = 17 - - private final static int JAVA8_COMPILE_PATH = 18; - private final static int JAVA8_TEST_COMPILE_PATH = 19; - private final static int JAVA8_TEST_SCOPED_COMPILE_PATH = 20; - private final static int JAVA8_RUNTIME_PATH = 21; // JAVA8_TEST_RUNTIME_PATH = 22 - private final static int JAVA8_TEST_SCOPED_RUNTIME_PATH = 23; - - private final static int ANNOTATION_PROC_PATH = 24; // TEST_ANNOTATION_PROC_PATH = 25 + private static final int SOURCE_PATH = 0; // TEST_SOURCE_PATH = 1 + private static final int COMPILE_TIME_PATH = 2; // TEST_COMPILE_TIME_PATH = 3 + private static final int RUNTIME_PATH = 4; // TEST_RUNTIME_PATH = 5 + private static final int BOOT_PATH = 6; // TEST_BOOT_PATH = 7 + private static final int ENDORSED_PATH = 8; + private static final int MODULE_BOOT_PATH = 9; + private static final int MODULE_COMPILE_PATH = 10; // TEST_MODULE_COMPILE_PATH = 11 + private static final int MODULE_LEGACY_PATH = 12; // TEST_MODULE_LEGACY_PATH = 13 + + private static final int MODULE_EXECUTE_PATH = 14; // TEST_MODULE_EXECUTE_PATH = 15 + private static final int MODULE_EXECUTE_CLASS_PATH = 16; // TEST_MODULE_EXECUTE_CLASS_PATH = 17 + + private static final int JAVA8_COMPILE_PATH = 18; + private static final int JAVA8_TEST_COMPILE_PATH = 19; + private static final int JAVA8_TEST_SCOPED_COMPILE_PATH = 20; + private static final int JAVA8_RUNTIME_PATH = 21; // JAVA8_TEST_RUNTIME_PATH = 22 + private static final int JAVA8_TEST_SCOPED_RUNTIME_PATH = 23; + + private static final int ANNOTATION_PROC_PATH = 24; // TEST_ANNOTATION_PROC_PATH = 25 private final ClassPath[] cache = new ClassPath[26]; @@ -754,7 +754,7 @@ public ClassPath getActiveClassPath() { } } - private static abstract class ClassPathSelector implements org.netbeans.spi.java.classpath.support.ClassPathSupport.Selector { + private abstract static class ClassPathSelector implements org.netbeans.spi.java.classpath.support.ClassPathSupport.Selector { protected final PropertyChangeSupport support = new PropertyChangeSupport(this); protected final NbMavenProjectImpl proj; diff --git a/java/maven/src/org/netbeans/modules/maven/customizer/CustomizerProviderImpl.java b/java/maven/src/org/netbeans/modules/maven/customizer/CustomizerProviderImpl.java index 06b31b3f750b..b11d8010d74b 100644 --- a/java/maven/src/org/netbeans/modules/maven/customizer/CustomizerProviderImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/customizer/CustomizerProviderImpl.java @@ -281,7 +281,7 @@ private POMModel init() throws XmlPullParserException, IOException { } - public static abstract class ModelAccessor { + public abstract static class ModelAccessor { public abstract void setConfigurationId(ModelHandle.Configuration cfg, String id); public abstract ModelHandle createHandle(POMModel model, MavenProject proj, Map mapp, @@ -289,7 +289,7 @@ public abstract ModelHandle createHandle(POMModel model, MavenProject proj, Map< } - public static abstract class ModelAccessor2 { + public abstract static class ModelAccessor2 { public abstract ModelHandle2 createHandle(POMModel model, MavenProject proj, Map mapp, List configs, ModelHandle2.Configuration active, MavenProjectPropsImpl auxProps); diff --git a/java/maven/src/org/netbeans/modules/maven/dependencies/CheckNode.java b/java/maven/src/org/netbeans/modules/maven/dependencies/CheckNode.java index fd75c1c62d47..f9a07d034375 100644 --- a/java/maven/src/org/netbeans/modules/maven/dependencies/CheckNode.java +++ b/java/maven/src/org/netbeans/modules/maven/dependencies/CheckNode.java @@ -31,8 +31,8 @@ */ public class CheckNode extends DefaultMutableTreeNode { - public final static int SINGLE_SELECTION = 0; - public final static int DIG_IN_SELECTION = 4; + public static final int SINGLE_SELECTION = 0; + public static final int DIG_IN_SELECTION = 4; private int selectionMode; private boolean isSelected; diff --git a/java/maven/src/org/netbeans/modules/maven/execute/ActionToGoalUtils.java b/java/maven/src/org/netbeans/modules/maven/execute/ActionToGoalUtils.java index d8aa361c73cd..d89f89670a61 100644 --- a/java/maven/src/org/netbeans/modules/maven/execute/ActionToGoalUtils.java +++ b/java/maven/src/org/netbeans/modules/maven/execute/ActionToGoalUtils.java @@ -77,7 +77,7 @@ public final class ActionToGoalUtils { } - public static abstract class ContextAccessor { + public abstract static class ContextAccessor { public abstract ExecutionContext createContext(InputOutput inputoutput, ProgressHandle handle); } diff --git a/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java b/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java index 070a8ff13323..05dbf936938a 100644 --- a/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java +++ b/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java @@ -143,7 +143,7 @@ public class MavenCommandLineExecutor extends AbstractMavenExecutor { private static final RequestProcessor RP = new RequestProcessor(MavenCommandLineExecutor.class.getName(),1); - private final static RequestProcessor UPDATE_INDEX_RP = new RequestProcessor(RunUtils.class.getName(), 5); + private static final RequestProcessor UPDATE_INDEX_RP = new RequestProcessor(RunUtils.class.getName(), 5); /** * Execute maven build in NetBeans execution engine. * Most callers should rather use {@link #run} as this variant does no (non-late-bound) prerequisite checks. diff --git a/java/maven/src/org/netbeans/modules/maven/execute/ModelRunConfig.java b/java/maven/src/org/netbeans/modules/maven/execute/ModelRunConfig.java index f7c4893740d7..0ed52f2690c8 100644 --- a/java/maven/src/org/netbeans/modules/maven/execute/ModelRunConfig.java +++ b/java/maven/src/org/netbeans/modules/maven/execute/ModelRunConfig.java @@ -43,7 +43,7 @@ */ public final class ModelRunConfig extends BeanRunConfig { - private final static Logger LOG = Logger.getLogger(ModelRunConfig.class.getName()); + private static final Logger LOG = Logger.getLogger(ModelRunConfig.class.getName()); private final NetbeansActionMapping model; private final boolean fallback; diff --git a/java/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java b/java/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java index f30cce6591b4..d6304a41175c 100644 --- a/java/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java +++ b/java/maven/src/org/netbeans/modules/maven/nodes/DependenciesNode.java @@ -250,7 +250,7 @@ private HashSet create(Set arts, boolean longLiving } } - private final static class DependencyWrapper { + private static final class DependencyWrapper { private final Artifact artifact; private final FileObject fileObject; diff --git a/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java b/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java index c64ac0c7022c..3df8aff34c78 100644 --- a/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java +++ b/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java @@ -93,7 +93,7 @@ public class SettingsPanel extends javax.swing.JPanel { private final DefaultComboBoxModel jdkHomeDataModel = new DefaultComboBoxModel(); private String mavenRuntimeHome = null; private int lastSelected = -1; - private final static RequestProcessor RP = new RequestProcessor(SettingsPanel.class); + private static final RequestProcessor RP = new RequestProcessor(SettingsPanel.class); private static class ComboBoxRenderer extends DefaultListCellRenderer { diff --git a/java/maven/src/org/netbeans/modules/maven/queries/RepositoryForBinaryQueryImpl.java b/java/maven/src/org/netbeans/modules/maven/queries/RepositoryForBinaryQueryImpl.java index 8898f270d399..89604edb07ad 100644 --- a/java/maven/src/org/netbeans/modules/maven/queries/RepositoryForBinaryQueryImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/queries/RepositoryForBinaryQueryImpl.java @@ -296,7 +296,7 @@ private static class SrcResult implements SourceForBinaryQueryImplementation2.Re private final PropertyChangeListener projectListener; private final FileChangeListener sourceJarChangeListener; private final RequestProcessor.Task checkChangesTask; - private final static int CHECK_CHANGES_DELAY = 50; + private static final int CHECK_CHANGES_DELAY = 50; private final String groupId; private final String artifactId; private final String version; diff --git a/java/maven/src/org/netbeans/modules/maven/runjar/MavenExecuteUtils.java b/java/maven/src/org/netbeans/modules/maven/runjar/MavenExecuteUtils.java index 6c747af48235..5876fe8ddc72 100644 --- a/java/maven/src/org/netbeans/modules/maven/runjar/MavenExecuteUtils.java +++ b/java/maven/src/org/netbeans/modules/maven/runjar/MavenExecuteUtils.java @@ -97,7 +97,7 @@ public final class MavenExecuteUtils { * made on the helper instance. Use {@link #createExecutionEnvHelper} * to make an instance. */ - public final static class ExecutionEnvHelper { + public static final class ExecutionEnvHelper { private final ActionToGoalMapping goalMappings; private final NbMavenProjectImpl project; diff --git a/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/actions/ExecJSAction.java b/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/actions/ExecJSAction.java index fcff4b262ae7..ecf98e8bd428 100644 --- a/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/actions/ExecJSAction.java +++ b/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/actions/ExecJSAction.java @@ -97,7 +97,7 @@ private FileObject getCurrentFile() { return Utilities.actionsGlobalContext().lookup(FileObject.class); } - abstract protected void exec(JavaPlatform javaPlatform, FileObject fo) throws IOException, UnsupportedOperationException; + protected abstract void exec(JavaPlatform javaPlatform, FileObject fo) throws IOException, UnsupportedOperationException; @Override public void stateChanged(ChangeEvent e) { diff --git a/java/performance/actionsframework/src/org/netbeans/actions/spi/ContextProviderSupport.java b/java/performance/actionsframework/src/org/netbeans/actions/spi/ContextProviderSupport.java index ea6bb07f9359..39d94dc07857 100644 --- a/java/performance/actionsframework/src/org/netbeans/actions/spi/ContextProviderSupport.java +++ b/java/performance/actionsframework/src/org/netbeans/actions/spi/ContextProviderSupport.java @@ -97,7 +97,7 @@ public interface Contributor { /** Implementation of Contributor which takes fixed arrays of keys and * values */ - public static abstract class FixedContributor implements Contributor { + public abstract static class FixedContributor implements Contributor { public final Map getContribution() { return new FixedMap(getKeys(), getValues()); } @@ -114,7 +114,7 @@ public final Map getContribution() { * Note that the map that will actually be used is a snapshot of the map * returned, taken at the time of updating. */ - public static abstract class ActiveContributor implements Contributor { + public abstract static class ActiveContributor implements Contributor { public abstract Map getContribution(); Map toFixedMap() { diff --git a/java/performance/mobility/test/qa-functional/src/org/netbeans/performance/mobility/actions/OpenMIDletEditorTest.java b/java/performance/mobility/test/qa-functional/src/org/netbeans/performance/mobility/actions/OpenMIDletEditorTest.java index dcb92f39277b..7c48b9538cae 100644 --- a/java/performance/mobility/test/qa-functional/src/org/netbeans/performance/mobility/actions/OpenMIDletEditorTest.java +++ b/java/performance/mobility/test/qa-functional/src/org/netbeans/performance/mobility/actions/OpenMIDletEditorTest.java @@ -45,7 +45,7 @@ public class OpenMIDletEditorTest extends PerformanceTestCase { private String targetProject; private String midletName; private ProjectsTabOperator pto; - public final static long EXPECTED_TIME = 10000; + public static final long EXPECTED_TIME = 10000; protected static String OPEN = org.netbeans.jellytools.Bundle.getStringTrimmed("org.openide.actions.Bundle", "Open"); /** diff --git a/java/performance/src/org/netbeans/modules/performance/guitracker/ActionTracker.java b/java/performance/src/org/netbeans/modules/performance/guitracker/ActionTracker.java index ddf21d78a285..3dbbcf341433 100644 --- a/java/performance/src/org/netbeans/modules/performance/guitracker/ActionTracker.java +++ b/java/performance/src/org/netbeans/modules/performance/guitracker/ActionTracker.java @@ -69,38 +69,38 @@ public class ActionTracker { /** * Start of a sequence of recorded events. */ - public final static int TRACK_START = 1; + public static final int TRACK_START = 1; /** * Painting happened. @see Painter */ - public final static int TRACK_PAINT = 2; + public static final int TRACK_PAINT = 2; /** * MOUSE_PRESSED event. */ - public final static int TRACK_MOUSE_PRESS = 10; + public static final int TRACK_MOUSE_PRESS = 10; /** * MOUSE_RELEASED event. */ - public final static int TRACK_MOUSE_RELEASE = 11; + public static final int TRACK_MOUSE_RELEASE = 11; /** * MOUSE_DRAGGED event. */ - public final static int TRACK_MOUSE_DRAGGED = 12; + public static final int TRACK_MOUSE_DRAGGED = 12; /** * MOUSE_MOVED event. */ - public final static int TRACK_MOUSE_MOVED = 13; + public static final int TRACK_MOUSE_MOVED = 13; /** * KEY_PRESSED event. */ - public final static int TRACK_KEY_PRESS = 20; + public static final int TRACK_KEY_PRESS = 20; /** * KEY_RELEASED event. */ - public final static int TRACK_KEY_RELEASE = 21; + public static final int TRACK_KEY_RELEASE = 21; private static final int TRACK_FRAME = 1000; private static final int TRACK_DIALOG = 2000; @@ -122,110 +122,110 @@ public class ActionTracker { /** * COMPONENT_SHOWN event happened on a Dialog or JDialog. */ - public final static int TRACK_DIALOG_SHOW = TRACK_DIALOG + ComponentEvent.COMPONENT_SHOWN; + public static final int TRACK_DIALOG_SHOW = TRACK_DIALOG + ComponentEvent.COMPONENT_SHOWN; /** * COMPONENT_HIDDEN event happened on a Dialog or JDialog. */ - public final static int TRACK_DIALOG_HIDE = TRACK_DIALOG + ComponentEvent.COMPONENT_HIDDEN; + public static final int TRACK_DIALOG_HIDE = TRACK_DIALOG + ComponentEvent.COMPONENT_HIDDEN; /** * COMPONENT_RESIZED event happened on a Dialog or JDialog. */ - public final static int TRACK_DIALOG_RESIZE = TRACK_DIALOG + ComponentEvent.COMPONENT_RESIZED; + public static final int TRACK_DIALOG_RESIZE = TRACK_DIALOG + ComponentEvent.COMPONENT_RESIZED; /** * COMPONENT_SHOWN event happened on a Component. */ - public final static int TRACK_COMPONENT_SHOW = TRACK_COMPONENT + ComponentEvent.COMPONENT_SHOWN; + public static final int TRACK_COMPONENT_SHOW = TRACK_COMPONENT + ComponentEvent.COMPONENT_SHOWN; /** * COMPONENT_HIDDEN event happened on a Component. */ - public final static int TRACK_COMPONENT_HIDE = TRACK_COMPONENT + ComponentEvent.COMPONENT_HIDDEN; + public static final int TRACK_COMPONENT_HIDE = TRACK_COMPONENT + ComponentEvent.COMPONENT_HIDDEN; /** * COMPONENT_RESIZED event happened on a Component. */ - public final static int TRACK_COMPONENT_RESIZE = TRACK_COMPONENT + ComponentEvent.COMPONENT_RESIZED; + public static final int TRACK_COMPONENT_RESIZE = TRACK_COMPONENT + ComponentEvent.COMPONENT_RESIZED; /** * Any messages the application wants to send. */ - public final static int TRACK_APPLICATION_MESSAGE = 50; + public static final int TRACK_APPLICATION_MESSAGE = 50; /** * Any messages the application wants to send. */ - public final static int TRACK_CONFIG_APPLICATION_MESSAGE = 51; + public static final int TRACK_CONFIG_APPLICATION_MESSAGE = 51; /** * Before/After messages. */ - public final static int TRACK_TRACE_MESSAGE = 52; + public static final int TRACK_TRACE_MESSAGE = 52; /** * Should be used only for value of MY_START_EVENT or MY_END_EVENT */ - public final static int TRACK_OPEN_BEFORE_TRACE_MESSAGE = TRACK_TRACE_MESSAGE + 1; + public static final int TRACK_OPEN_BEFORE_TRACE_MESSAGE = TRACK_TRACE_MESSAGE + 1; /** * Should be used only for value of MY_START_EVENT or MY_END_EVENT */ - public final static int TRACK_OPEN_AFTER_TRACE_MESSAGE = TRACK_TRACE_MESSAGE + 2; + public static final int TRACK_OPEN_AFTER_TRACE_MESSAGE = TRACK_TRACE_MESSAGE + 2; /** * FOCUS_GAINED event */ - public final static int TRACK_FOCUS_GAINED = 80; + public static final int TRACK_FOCUS_GAINED = 80; /** * FOCUS_LOST event */ - public final static int TRACK_FOCUS_LOST = 81; + public static final int TRACK_FOCUS_LOST = 81; /** * unknown event */ - public final static int TRACK_INVOCATION = 82; + public static final int TRACK_INVOCATION = 82; /** * unknown event */ - public final static int TRACK_UNKNOWN = 83; + public static final int TRACK_UNKNOWN = 83; /** * The name of the root element in generated XML. */ - public final static String TN_ROOT_ELEMENT = "action-tracking"; + public static final String TN_ROOT_ELEMENT = "action-tracking"; /** * The name of the event-list element in generated XML. */ - public final static String TN_EVENT_LIST = "event-list"; + public static final String TN_EVENT_LIST = "event-list"; /** * The name of each event element in generated XML. */ - public final static String TN_EVENT = "event"; + public static final String TN_EVENT = "event"; /** * The attribute name for start time. */ - public final static String ATTR_START = "start"; + public static final String ATTR_START = "start"; /** * The attribute name for descriptive phrase. */ - public final static String ATTR_NAME = "name"; + public static final String ATTR_NAME = "name"; /** * The attribute name for the node-type. */ - public final static String ATTR_TYPE = "type"; + public static final String ATTR_TYPE = "type"; /** * The attribute name for the timestamp. */ - public final static String ATTR_TIME = "time"; + public static final String ATTR_TIME = "time"; /** * The attribute name for calculated time difference since the start. */ - public final static String ATTR_TIME_DIFF_START = "diff"; + public static final String ATTR_TIME_DIFF_START = "diff"; /** * The attribute name for calculated time difference since the last * MOUSE_DRAGGED event. */ - public final static String ATTR_TIME_DIFF_DRAG = "diffdrag"; + public static final String ATTR_TIME_DIFF_DRAG = "diffdrag"; /** * The attribute measured for events we are measuring one start + one stop. */ - public final static String ATTR_MEASURED = "measured"; + public static final String ATTR_MEASURED = "measured"; // Instance of the ActionTracker private static ActionTracker instance = null; diff --git a/java/performance/src/org/netbeans/modules/performance/utilities/MeasureStartupTimeTestCase.java b/java/performance/src/org/netbeans/modules/performance/utilities/MeasureStartupTimeTestCase.java index 11d518a80c9e..6c9b31902d77 100644 --- a/java/performance/src/org/netbeans/modules/performance/utilities/MeasureStartupTimeTestCase.java +++ b/java/performance/src/org/netbeans/modules/performance/utilities/MeasureStartupTimeTestCase.java @@ -79,7 +79,7 @@ public class MeasureStartupTimeTestCase extends org.netbeans.junit.NbPerformance /** * Number used for unknown time. */ - protected final static long UNKNOWN_TIME = -1; + protected static final long UNKNOWN_TIME = -1; /** * Table of the supported platforms. diff --git a/java/performance/threaddemo/src/threaddemo/locking/EventLock.java b/java/performance/threaddemo/src/threaddemo/locking/EventLock.java index 95bd0db18afa..351c3194debd 100644 --- a/java/performance/threaddemo/src/threaddemo/locking/EventLock.java +++ b/java/performance/threaddemo/src/threaddemo/locking/EventLock.java @@ -36,7 +36,7 @@ */ final class EventLock implements RWLock { - public final static RWLock DEFAULT = new EventLock(); + public static final RWLock DEFAULT = new EventLock(); private EventLock() {} diff --git a/java/performance/threaddemo/src/threaddemo/util/TwoWaySupport.java b/java/performance/threaddemo/src/threaddemo/util/TwoWaySupport.java index 322c7b7ba35f..0e2ffed54ccc 100644 --- a/java/performance/threaddemo/src/threaddemo/util/TwoWaySupport.java +++ b/java/performance/threaddemo/src/threaddemo/util/TwoWaySupport.java @@ -271,7 +271,7 @@ public final RWLock getLock() { * to pass to {@link TwoWayEvent.Derived}, which may be useful for subclasses * firing changes. */ - protected final static class DerivationResult { + protected static final class DerivationResult { final DM newValue; final DMD derivedDelta; /** diff --git a/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/EclipseProjectReference.java b/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/EclipseProjectReference.java index 19142ad7b482..48a63089f4dc 100644 --- a/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/EclipseProjectReference.java +++ b/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/EclipseProjectReference.java @@ -58,8 +58,8 @@ public class EclipseProjectReference { private EclipseProject eclipseProject; private ProjectImportModel importModel; - private final static String PROJECT_PREFIX = "project-"; //NOI18N - private final static String WORKSPACE_PREFIX = "workspace-"; //NOI18N + private static final String PROJECT_PREFIX = "project-"; //NOI18N + private static final String WORKSPACE_PREFIX = "workspace-"; //NOI18N public EclipseProjectReference(Project project, String eclipseProjectLocation, String eclipseWorkspaceLocation, long timestamp, String key) { this.eclipseProjectLocation = PropertyUtils.resolveFile(FileUtil.toFile(project.getProjectDirectory()), eclipseProjectLocation); diff --git a/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/UpgradableProject.java b/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/UpgradableProject.java index 77775dba41f5..cf2d5526e1cb 100644 --- a/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/UpgradableProject.java +++ b/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/UpgradableProject.java @@ -33,7 +33,7 @@ /** * */ -final public class UpgradableProject { +public final class UpgradableProject { private Project project; private EclipseProjectReference reference; diff --git a/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/spi/UpgradableProjectLookupProvider.java b/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/spi/UpgradableProjectLookupProvider.java index 9b4206963153..e50bb3ece337 100644 --- a/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/spi/UpgradableProjectLookupProvider.java +++ b/java/projectimport.eclipse.core/src/org/netbeans/modules/projectimport/eclipse/core/spi/UpgradableProjectLookupProvider.java @@ -28,7 +28,7 @@ import org.openide.util.lookup.Lookups; // registered separately in j2se and web modules, otherwise could use @LookupProvider.Registration -final public class UpgradableProjectLookupProvider implements LookupProvider { +public final class UpgradableProjectLookupProvider implements LookupProvider { public Lookup createAdditionalLookup(Lookup baseContext) { Project p = baseContext.lookup(Project.class); diff --git a/java/projectimport.eclipse.core/test/qa-functional/src/org/netbeans/modules/projectimport/eclipse/gui/ProjectImporterTestCase.java b/java/projectimport.eclipse.core/test/qa-functional/src/org/netbeans/modules/projectimport/eclipse/gui/ProjectImporterTestCase.java index dfc1aa42bd76..55145d260a20 100644 --- a/java/projectimport.eclipse.core/test/qa-functional/src/org/netbeans/modules/projectimport/eclipse/gui/ProjectImporterTestCase.java +++ b/java/projectimport.eclipse.core/test/qa-functional/src/org/netbeans/modules/projectimport/eclipse/gui/ProjectImporterTestCase.java @@ -43,7 +43,7 @@ */ public abstract class ProjectImporterTestCase extends NbTestCase { - private final static String caption = Bundle.getStringTrimmed("org.netbeans.modules.projectimport.eclipse.core.wizard.Bundle", "CTL_WizardTitle"); + private static final String caption = Bundle.getStringTrimmed("org.netbeans.modules.projectimport.eclipse.core.wizard.Bundle", "CTL_WizardTitle"); protected ProjectsTabOperator pto = null; public ProjectImporterTestCase(String testName) { diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTasks.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTasks.java index 3c4027fb01a9..7e83260fb25d 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTasks.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTasks.java @@ -238,7 +238,7 @@ public Call getRoot() { } - private static abstract class CallTaskBase implements Runnable, CancellableTask { + private abstract static class CallTaskBase implements Runnable, CancellableTask { protected final Call elmDesc; private final Runnable resultHandler; diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java index 40f45518fcad..8a3f77da0b88 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java @@ -393,7 +393,7 @@ public boolean requestFocusInWindow() { return beanTreeView.requestFocusInWindow(); } - final static class ResolvableHelper implements Serializable { + static final class ResolvableHelper implements Serializable { private static final long serialVersionUID = 1L; diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java index 19a5e846c401..cd8e624bbdfe 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ChangeParamsTransformer.java @@ -917,9 +917,9 @@ public Boolean reduce(Boolean r1, Boolean r2) { */ private static class TagComparator implements Comparator { - private final static int HIGHER = -1; - private final static int EQUAL = 0; - private final static int LOWER = 1; + private static final int HIGHER = -1; + private static final int EQUAL = 0; + private static final int LOWER = 1; @Override public int compare(DocTree t, DocTree t1) { diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractInterfaceRefactoringPlugin.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractInterfaceRefactoringPlugin.java index 3216e08e5914..dc17fc1b5b62 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractInterfaceRefactoringPlugin.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractInterfaceRefactoringPlugin.java @@ -271,7 +271,7 @@ private static List findUsedGenericTypes(ExtractInterfaceRefactoring // --- REFACTORING ELEMENTS ------------------------------------------------ - private final static class UpdateClassTask implements CancellableTask { + private static final class UpdateClassTask implements CancellableTask { private final ExtractInterfaceRefactoring refactoring; private final ElementHandle sourceType; diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractSuperclassRefactoringPlugin.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractSuperclassRefactoringPlugin.java index f09cec19a2f6..b2e1417c39ce 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractSuperclassRefactoringPlugin.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/ExtractSuperclassRefactoringPlugin.java @@ -272,7 +272,7 @@ public Problem prepare(RefactoringElementsBag bag) { return problem; } - private final static class ExtractSuperclassTransformer extends RefactoringVisitor { + private static final class ExtractSuperclassTransformer extends RefactoringVisitor { private final ExtractSuperclassRefactoring refactoring; private final ElementHandle sourceType; private List members; diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ContextAnalyzer.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ContextAnalyzer.java index 5e86a681120f..b0ecdf581261 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ContextAnalyzer.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ContextAnalyzer.java @@ -183,7 +183,7 @@ public static boolean canRefactorSingle(Lookup lookup, boolean notOnlyFile, bool return !notOnlyFile; } - private static abstract class TreePathHandleTask implements Runnable, CancellableTask { + private abstract static class TreePathHandleTask implements Runnable, CancellableTask { private Collection handles = new ArrayList(); private TreePathHandle current; private FileObject file; @@ -277,7 +277,7 @@ protected void treePathHandleResolved(TreePathHandle handle, CompilationInfo jav protected abstract RefactoringUI createRefactoringUI(Collection handles); } - private static abstract class TextComponentTask implements Runnable, CancellableTask { + private abstract static class TextComponentTask implements Runnable, CancellableTask { private JTextComponent textC; private int caret; private int start; @@ -480,7 +480,7 @@ private static boolean isInsideClass(TreePath tp) { return false; } - private static abstract class NodeToElementTask implements Runnable, CancellableTask { + private abstract static class NodeToElementTask implements Runnable, CancellableTask { private Node node; private RefactoringUI ui; @@ -526,7 +526,7 @@ public final void run() { protected abstract RefactoringUI createRefactoringUI(TreePathHandle selectedElement, CompilationInfo info); } - private static abstract class NodeToFileObjectTask implements Runnable, CancellableTask { + private abstract static class NodeToFileObjectTask implements Runnable, CancellableTask { private Collection nodes; public ArrayList pkg; Collection handles = new ArrayList(); diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ReplaceConstructorWithBuilderPanel.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ReplaceConstructorWithBuilderPanel.java index 3e30222144e6..4ab1916510c2 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ReplaceConstructorWithBuilderPanel.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ReplaceConstructorWithBuilderPanel.java @@ -38,7 +38,7 @@ */ public class ReplaceConstructorWithBuilderPanel extends javax.swing.JPanel implements CustomRefactoringPanel { - private final static String DEFAULT_PREFIX = "set"; + private static final String DEFAULT_PREFIX = "set"; private static final String[] columnNames = { getString("LBL_BuilderParameter"), // NOI18N getString("LBL_BuilderSetterName"), // NOI18N diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/WhereUsedPanel.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/WhereUsedPanel.java index 583ac8df73b4..3332292981fc 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/WhereUsedPanel.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/WhereUsedPanel.java @@ -171,7 +171,7 @@ public void run() { initialized = true; } - static abstract class WhereUsedInnerPanel extends JPanel { + abstract static class WhereUsedInnerPanel extends JPanel { abstract boolean isSearchInComments(); abstract void initialize(Element element, CompilationController info); } diff --git a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/scope/CustomScopePanel.java b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/scope/CustomScopePanel.java index 303168550b73..cf84e5f9cdf6 100644 --- a/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/scope/CustomScopePanel.java +++ b/java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/scope/CustomScopePanel.java @@ -376,7 +376,7 @@ protected void setSelected(boolean selected, boolean event) { } } - private static abstract class CustomNode extends AbstractNode implements PropertyChangeListener { + private abstract static class CustomNode extends AbstractNode implements PropertyChangeListener { protected final CustomScopePanel panel; private final Data data; diff --git a/java/refactoring.java/test/qa-functional/src/org/netbeans/modules/test/refactoring/RefactoringTestCase.java b/java/refactoring.java/test/qa-functional/src/org/netbeans/modules/test/refactoring/RefactoringTestCase.java index b86d97f8f555..3f7aeb63608b 100644 --- a/java/refactoring.java/test/qa-functional/src/org/netbeans/modules/test/refactoring/RefactoringTestCase.java +++ b/java/refactoring.java/test/qa-functional/src/org/netbeans/modules/test/refactoring/RefactoringTestCase.java @@ -68,7 +68,7 @@ public abstract class RefactoringTestCase extends JellyTestCase { * root then this values will be sorted before dumping to ref file */ public static int sortLevel = 2; - protected final static String REFACTORING_TEST = "RefactoringTest"; + protected static final String REFACTORING_TEST = "RefactoringTest"; public RefactoringTestCase(String name) { super(name); diff --git a/java/selenium2.maven/src/org/netbeans/modules/selenium2/maven/Selenium2MavenSupportImpl.java b/java/selenium2.maven/src/org/netbeans/modules/selenium2/maven/Selenium2MavenSupportImpl.java index 19ad39e9fcfd..e9b1b1d14a31 100644 --- a/java/selenium2.maven/src/org/netbeans/modules/selenium2/maven/Selenium2MavenSupportImpl.java +++ b/java/selenium2.maven/src/org/netbeans/modules/selenium2/maven/Selenium2MavenSupportImpl.java @@ -68,13 +68,13 @@ @ServiceProvider(service = Selenium2SupportImpl.class) public class Selenium2MavenSupportImpl extends Selenium2SupportImpl { - private final static String JUNIT_GROUP_ID = "junit"; //NOI18N - private final static String JUNIT_ARTIFACT_ID = "junit"; //NOI18N - private final static String SELENIUM_GROUP_ID = "org.seleniumhq.selenium"; //NOI18N - private final static String SELENIUM_ARTIFACT_ID = "selenium-java"; //NOI18N - private final static String SELENIUM_REMOTE_DRIVER_ARTIFACT_ID = "selenium-remote-driver"; //NOI18N - private final static String OPERA_GROUP_ID = "com.opera"; //NOI18N - private final static String OPERA_ARTIFACT_ID = "operadriver"; //NOI18N + private static final String JUNIT_GROUP_ID = "junit"; //NOI18N + private static final String JUNIT_ARTIFACT_ID = "junit"; //NOI18N + private static final String SELENIUM_GROUP_ID = "org.seleniumhq.selenium"; //NOI18N + private static final String SELENIUM_ARTIFACT_ID = "selenium-java"; //NOI18N + private static final String SELENIUM_REMOTE_DRIVER_ARTIFACT_ID = "selenium-remote-driver"; //NOI18N + private static final String OPERA_GROUP_ID = "com.opera"; //NOI18N + private static final String OPERA_ARTIFACT_ID = "operadriver"; //NOI18N @Override public boolean isSupportActive(Project p) { diff --git a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaFixImpl.java b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaFixImpl.java index 39e7fed3cbd0..06a55fab4089 100644 --- a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaFixImpl.java +++ b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaFixImpl.java @@ -114,7 +114,7 @@ public EnhancedJavaFixImpl(JavaFix jf) { } - public static abstract class Accessor { + public abstract static class Accessor { static { try { diff --git a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java index e85c528b7c25..f01480dfa641 100644 --- a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java +++ b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java @@ -531,7 +531,7 @@ public static interface MapIndices { public IndexEnquirer findIndex(FileObject root, ProgressHandleWrapper progress, boolean recursive); } - public static abstract class IndexEnquirer { + public abstract static class IndexEnquirer { final FileObject src; public IndexEnquirer(FileObject src) { this.src = src; @@ -541,7 +541,7 @@ public IndexEnquirer(FileObject src) { // public int[] getEstimatedSpan(Resource r); } - public static abstract class LocalIndexEnquirer extends IndexEnquirer { + public abstract static class LocalIndexEnquirer extends IndexEnquirer { public LocalIndexEnquirer(FileObject src) { super(src); } diff --git a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearch.java b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearch.java index 205f47eb18b9..eb0452281a6b 100644 --- a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearch.java +++ b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearch.java @@ -95,7 +95,7 @@ public final BulkPattern create(CompilationInfo info, AtomicBoolean cancel, Coll @CheckForNull public abstract BulkPattern create(Collection code, Collection patterns, Collection additionalConstraints, AtomicBoolean cancel); - public static abstract class BulkPattern { + public abstract static class BulkPattern { private final List patterns; private final List> identifiers; diff --git a/java/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearchTest.java b/java/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearchTest.java index 274b22561514..a03e88ebee1e 100644 --- a/java/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearchTest.java +++ b/java/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearchTest.java @@ -371,11 +371,11 @@ public static final class ClassPathProviderImpl implements ClassPathProvider { private static Collection sourceRoots; - public synchronized static void setSourceRoots(Collection sourceRoots) { + public static synchronized void setSourceRoots(Collection sourceRoots) { ClassPathProviderImpl.sourceRoots = sourceRoots; } - public synchronized static Collection getSourceRoots() { + public static synchronized Collection getSourceRoots() { return sourceRoots; } diff --git a/java/spring.beans/src/org/netbeans/modules/spring/beans/completion/completors/BeansRefCompletor.java b/java/spring.beans/src/org/netbeans/modules/spring/beans/completion/completors/BeansRefCompletor.java index ef568784a1c0..bd79b6adfdbd 100644 --- a/java/spring.beans/src/org/netbeans/modules/spring/beans/completion/completors/BeansRefCompletor.java +++ b/java/spring.beans/src/org/netbeans/modules/spring/beans/completion/completors/BeansRefCompletor.java @@ -45,7 +45,7 @@ */ public class BeansRefCompletor extends Completor { - final private boolean includeGlobal; + private final boolean includeGlobal; public BeansRefCompletor(boolean includeGlobal, int invocationOffset) { super(invocationOffset); diff --git a/java/spring.beans/src/org/netbeans/modules/spring/beans/model/ExclusiveAccess.java b/java/spring.beans/src/org/netbeans/modules/spring/beans/model/ExclusiveAccess.java index caf7f7634f29..85d3a6008872 100644 --- a/java/spring.beans/src/org/netbeans/modules/spring/beans/model/ExclusiveAccess.java +++ b/java/spring.beans/src/org/netbeans/modules/spring/beans/model/ExclusiveAccess.java @@ -34,7 +34,7 @@ public final class ExclusiveAccess { // TODO improve the priority of runSyncTask() tasks. - private final static ExclusiveAccess INSTANCE = new ExclusiveAccess(); + private static final ExclusiveAccess INSTANCE = new ExclusiveAccess(); private final RequestProcessor rp = new RequestProcessor("Spring config file access thread", 1, false); // NOI18N private final ReentrantLock lock = new ReentrantLock(); diff --git a/java/spring.beans/src/org/netbeans/modules/spring/beans/model/impl/ObjectProviders.java b/java/spring.beans/src/org/netbeans/modules/spring/beans/model/impl/ObjectProviders.java index 94b3e335de3d..88dbc4d82097 100644 --- a/java/spring.beans/src/org/netbeans/modules/spring/beans/model/impl/ObjectProviders.java +++ b/java/spring.beans/src/org/netbeans/modules/spring/beans/model/impl/ObjectProviders.java @@ -49,7 +49,7 @@ public SpringBeanImpl createObject(AnnotationModelHelper helper, TypeElement typ } } - private static abstract class AbstractProvider implements ObjectProvider { + private abstract static class AbstractProvider implements ObjectProvider { private Set annotationTypeNames; private AnnotationModelHelper helper; diff --git a/java/testng/src/org/netbeans/modules/testng/TestUtil.java b/java/testng/src/org/netbeans/modules/testng/TestUtil.java index 3f023feba29e..89fc6702088d 100644 --- a/java/testng/src/org/netbeans/modules/testng/TestUtil.java +++ b/java/testng/src/org/netbeans/modules/testng/TestUtil.java @@ -56,26 +56,26 @@ * @version 1.1 */ public class TestUtil extends CommonTestUtil { - static private final String JAVA_SOURCES_SUFFIX = "java"; + private static final String JAVA_SOURCES_SUFFIX = "java"; private static final String JAVA_MIME_TYPE = "text/x-java"; //NOI18N - static private String getTestClassSuffix() { + private static String getTestClassSuffix() { return TestNGSettings.TEST_CLASSNAME_SUFFIX; } - static private String getTestClassPrefix() { + private static String getTestClassPrefix() { return TestNGSettings.TEST_CLASSNAME_PREFIX; } - static private String getTestSuiteSuffix() { + private static String getTestSuiteSuffix() { return TestNGSettings.SUITE_CLASSNAME_SUFFIX; } - static private String getTestSuitePrefix() { + private static String getTestSuitePrefix() { return TestNGSettings.SUITE_CLASSNAME_PREFIX; } - static private String getRootSuiteName() { + private static String getRootSuiteName() { return TestNGSettings.getDefault().getRootSuiteClassName(); } @@ -371,7 +371,7 @@ public static List getJavaFileNames(FileObject packageFolder, ClasspathI // return cls.getInnerClass(name, false); // } - static public String createNewName(int i, Set usedNames) { + public static String createNewName(int i, Set usedNames) { String ret; do { ret = "p" + i++; diff --git a/java/whitelist/src/org/netbeans/modules/whitelist/project/WhiteListLookupProvider.java b/java/whitelist/src/org/netbeans/modules/whitelist/project/WhiteListLookupProvider.java index 56e637b102f7..35f3a9be03ef 100644 --- a/java/whitelist/src/org/netbeans/modules/whitelist/project/WhiteListLookupProvider.java +++ b/java/whitelist/src/org/netbeans/modules/whitelist/project/WhiteListLookupProvider.java @@ -48,7 +48,7 @@ public class WhiteListLookupProvider implements LookupProvider { private static final String PROP_WHITELIST = "whitelist-"; //@GuardedBy("lookupCache") - private final static Map> lookupCache = + private static final Map> lookupCache = Collections.synchronizedMap(new WeakHashMap>());