Skip to content

Commit

Permalink
no need static methods to be final
Browse files Browse the repository at this point in the history
Intellij IDEA inspections
  • Loading branch information
martin-g committed Mar 27, 2014
1 parent 225f967 commit 2bd2234
Show file tree
Hide file tree
Showing 22 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class MetaDataRoleAuthorizationStrategy extends AbstractRoleAuthorization
* The comma separated roles that are authorized to create component instances of
* type componentClass
*/
public static final <T extends Component> void authorize(final Class<T> componentClass,
public static <T extends Component> void authorize(final Class<T> componentClass,
final String roles)
{
final Application application = Application.get();
Expand All @@ -109,7 +109,7 @@ public static final <T extends Component> void authorize(final Class<T> componen
* @param roles
* The comma separated roles to authorize
*/
public static final void authorize(final Component component, final Action action,
public static void authorize(final Component component, final Action action,
final String roles)
{
ActionPermissions permissions = component.getMetaData(ACTION_PERMISSIONS);
Expand All @@ -129,7 +129,7 @@ public static final void authorize(final Component component, final Action actio
* @param componentClass
* The component class
*/
public static final <T extends Component> void authorizeAll(final Class<T> componentClass)
public static <T extends Component> void authorizeAll(final Class<T> componentClass)
{
Application application = Application.get();
InstantiationPermissions authorizedRoles = application.getMetaData(INSTANTIATION_PERMISSIONS);
Expand All @@ -147,7 +147,7 @@ public static final <T extends Component> void authorizeAll(final Class<T> compo
* @param action
* The action to authorize
*/
public static final void authorizeAll(final Component component, final Action action)
public static void authorizeAll(Component component, final Action action)
{
ActionPermissions permissions = component.getMetaData(ACTION_PERMISSIONS);
if (permissions != null)
Expand All @@ -171,7 +171,7 @@ public static final void authorizeAll(final Component component, final Action ac
* The comma separated list of roles that are no longer to be authorized to create
* instances of type componentClass
*/
public static final <T extends Component> void unauthorize(final Class<T> componentClass,
public static <T extends Component> void unauthorize(final Class<T> componentClass,
final String roles)
{
final InstantiationPermissions permissions = Application.get().getMetaData(
Expand All @@ -197,7 +197,7 @@ public static final <T extends Component> void unauthorize(final Class<T> compon
* The comma separated list of roles that are no longer allowed to perform the given
* action
*/
public static final void unauthorize(final Component component, final Action action,
public static void unauthorize(final Component component, final Action action,
final String roles)
{
final ActionPermissions permissions = component.getMetaData(ACTION_PERMISSIONS);
Expand All @@ -216,7 +216,7 @@ public static final void unauthorize(final Component component, final Action act
* @param componentClass
* The component class
*/
public static final <T extends Component> void unauthorizeAll(Class<T> componentClass)
public static <T extends Component> void unauthorizeAll(Class<T> componentClass)
{
authorizeAll(componentClass);
authorize(componentClass, NO_ROLE);
Expand All @@ -231,7 +231,7 @@ public static final <T extends Component> void unauthorizeAll(Class<T> component
* @param action
* the action to authorize
*/
public static final void unauthorizeAll(final Component component, final Action action)
public static void unauthorizeAll(final Component component, final Action action)
{
authorizeAll(component, action);
authorize(component, action, NO_ROLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class RequestListenerInterface
* @return The RequestListenerInterface object, or null if none is found
*
*/
public static final RequestListenerInterface forName(final String interfaceName)
public static RequestListenerInterface forName(final String interfaceName)
{
return interfaces.get(interfaceName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ public Writer write(Writer writer) throws JSONException {
return this.write(writer, 0, 0);
}

static final Writer writeValue(Writer writer, Object value,
static Writer writeValue(Writer writer, Object value,
int indentFactor, int indent) throws JSONException, IOException {
if (value == null || value.equals(null)) {
writer.write("null");
Expand Down Expand Up @@ -1578,7 +1578,7 @@ static final Writer writeValue(Writer writer, Object value,
return writer;
}

static final void indent(Writer writer, int indent) throws IOException {
static void indent(Writer writer, int indent) throws IOException {
for (int i = 0; i < indent; i += 1) {
writer.write(' ');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private EmptyAjaxRequestHandler()
*
* @return the singleton instance
*/
public static final EmptyAjaxRequestHandler getInstance()
public static EmptyAjaxRequestHandler getInstance()
{
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class MarkupCache implements IMarkupCache
*
* @return The markup cache registered with the {@link Application}
*/
public final static IMarkupCache get()
public static IMarkupCache get()
{
return Application.get().getMarkupSettings().getMarkupFactory().getMarkupCache();
}
Expand Down
16 changes: 8 additions & 8 deletions wicket-core/src/main/java/org/apache/wicket/markup/TagUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public TagUtils()
*
* @param tag
*/
public static final boolean isBodyTag(final ComponentTag tag)
public static boolean isBodyTag(final ComponentTag tag)
{
return ("body".equalsIgnoreCase(tag.getName()) && (tag.getNamespace() == null));
}
Expand All @@ -63,7 +63,7 @@ public static final boolean isBodyTag(final ComponentTag tag)
* @param elem
* @return True, if tag name equals '&lt;head ...&gt;'
*/
public static final boolean isHeadTag(final MarkupElement elem)
public static boolean isHeadTag(final MarkupElement elem)
{
if (elem instanceof ComponentTag)
{
Expand All @@ -82,7 +82,7 @@ public static final boolean isHeadTag(final MarkupElement elem)
* @param i
* @return True if the markup element at index 'i' is a WicketTag
*/
public static final boolean isWicketTag(final IMarkupFragment markup, final int i)
public static boolean isWicketTag(final IMarkupFragment markup, final int i)
{
MarkupElement elem = markup.get(i);
return elem instanceof WicketTag;
Expand All @@ -94,7 +94,7 @@ public static final boolean isWicketTag(final IMarkupFragment markup, final int
* @param i
* @return True if the markup element at index 'i' is a &lt;wicket:extend&gt; tag
*/
public static final boolean isExtendTag(final IMarkupFragment markup, final int i)
public static boolean isExtendTag(final IMarkupFragment markup, final int i)
{
MarkupElement elem = markup.get(i);
if (elem instanceof WicketTag)
Expand All @@ -110,7 +110,7 @@ public static final boolean isExtendTag(final IMarkupFragment markup, final int
* @param elem
* @return True if the current markup element is a &lt;wicket:head&gt; tag
*/
public static final boolean isWicketHeadTag(final MarkupElement elem)
public static boolean isWicketHeadTag(final MarkupElement elem)
{
if (elem instanceof WicketTag)
{
Expand All @@ -128,7 +128,7 @@ public static final boolean isWicketHeadTag(final MarkupElement elem)
* @param elem
* @return True if the current markup element is a &lt;wicket:header-items&gt; tag
*/
public static final boolean isWicketHeaderItemsTag(final MarkupElement elem)
public static boolean isWicketHeaderItemsTag(final MarkupElement elem)
{
if (elem instanceof WicketTag)
{
Expand All @@ -146,7 +146,7 @@ public static final boolean isWicketHeaderItemsTag(final MarkupElement elem)
* @param elem
* @return True if the current markup element is a &lt;wicket:body&gt; tag
*/
public static final boolean isWicketBodyTag(final MarkupElement elem)
public static boolean isWicketBodyTag(final MarkupElement elem)
{
if (elem instanceof WicketTag)
{
Expand All @@ -164,7 +164,7 @@ public static final boolean isWicketBodyTag(final MarkupElement elem)
* @param elem
* @return True if the current markup element is a &lt;wicket:border&gt; tag
*/
public static final boolean isWicketBorderTag(final MarkupElement elem)
public static boolean isWicketBorderTag(final MarkupElement elem)
{
if (elem instanceof WicketTag)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class MarkupUtil
* @return True if the Page and all it's Panels, Borders etc. have HTML5 compliant markup. HTML5
* markup is identified by &lt;DOCTYPE html&gt;
*/
public final static boolean isMarkupHtml5Compliant(final MarkupContainer container)
public static boolean isMarkupHtml5Compliant(final MarkupContainer container)
{
Args.notNull(container, "container");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void component(Component child, IVisit<Component> visit)
return null;
}

public static final String getLabelIdFor(Component component)
public static String getLabelIdFor(Component component)
{
return component.getMarkupId() + "-w-lbl";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public IModel<T> getModel()
* The visitor to call
* @return the visitor's result
*/
public static final <R> R visitFormComponentsPostOrder(Component component,
public static <R> R visitFormComponentsPostOrder(Component component,
final IVisitor<? extends FormComponent<?>, R> visitor)
{
return Visits.visitPostOrder(component, visitor, new IVisitFilter()
Expand Down Expand Up @@ -421,7 +421,7 @@ public boolean visitObject(Object object)
* The visitor to call
* @return the visitor's result
*/
public static final <R> R visitComponentsPostOrder(Component component,
public static <R> R visitComponentsPostOrder(Component component,
final org.apache.wicket.util.visit.IVisitor<Component, R> visitor)
{
Args.notNull(visitor, "visitor");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public final class DefaultMarkupSourcingStrategy extends AbstractMarkupSourcingS
*
* @return A singleton of the strategy
*/
public final static DefaultMarkupSourcingStrategy get()
public static DefaultMarkupSourcingStrategy get()
{
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static class IndexComparator implements Comparator<Item<?>>, Serializable
/**
* @return static instance of the comparator
*/
public static final Comparator<Item<?>> getInstance()
public static Comparator<Item<?>> getInstance()
{
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ public void flush()
actions.add(new FlushAction());
}

private static final void writeStream(final Response response, ByteArrayOutputStream stream)
private static void writeStream(final Response response, ByteArrayOutputStream stream)
{
final boolean copied[] = { false };
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public HttpServletRequest getWrapper(final HttpServletRequest request)
* @param commaDelimitedPatterns
* @return array of patterns (not <code>null</code>)
*/
public static final Pattern[] commaDelimitedListToPatternArray(
public static Pattern[] commaDelimitedListToPatternArray(
final String commaDelimitedPatterns)
{
String[] patterns = commaDelimitedListToStringArray(commaDelimitedPatterns);
Expand All @@ -122,7 +122,7 @@ public static final Pattern[] commaDelimitedListToPatternArray(
* @param commaDelimitedStrings
* @return array of patterns (non <code>null</code>)
*/
public static final String[] commaDelimitedListToStringArray(final String commaDelimitedStrings)
public static String[] commaDelimitedListToStringArray(final String commaDelimitedStrings)
{
if (Strings.isEmpty(commaDelimitedStrings))
{
Expand All @@ -140,7 +140,7 @@ public static final String[] commaDelimitedListToStringArray(final String commaD
* @param stringList
* @return xxx
*/
public static final String listToCommaDelimitedString(final List<String> stringList)
public static String listToCommaDelimitedString(final List<String> stringList)
{
return Strings.join(", ", stringList);
}
Expand All @@ -152,7 +152,7 @@ public static final String listToCommaDelimitedString(final List<String> stringL
* @return Return <code>true</code> if the given <code>str</code> matches at least one of the
* given <code>patterns</code>.
*/
public static final boolean matchesOne(final String str, final Pattern... patterns)
public static boolean matchesOne(final String str, final Pattern... patterns)
{
for (Pattern pattern : patterns)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private NullResponse()
/**
* @return The one and only instance of NullResponse
*/
public static final NullResponse getInstance()
public static NullResponse getInstance()
{
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public final class DiffUtil
* The name of the expected result file to be created
* @throws IOException
*/
public final static void replaceExpectedResultFile(final String document, final Class<?> clazz,
public static void replaceExpectedResultFile(final String document, final Class<?> clazz,
final String file) throws IOException
{
String filename = clazz.getPackage().getName();
Expand Down Expand Up @@ -89,7 +89,7 @@ public final static void replaceExpectedResultFile(final String document, final
* @return true, if equal
* @throws IOException
*/
public static final boolean validatePage(String document, final Class<?> clazz,
public static boolean validatePage(String document, final Class<?> clazz,
final String file, boolean failWithAssert) throws IOException
{
Args.notNull(document, "document");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ComponentReferenceApplication extends WicketExampleApplication
/**
* @return persons db
*/
public static final List<Person> getPersons()
public static List<Person> getPersons()
{
return personsDB;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final class StringAutoCompleteRenderer extends AbstractAutoCompleteTextRe
* @return the single instance
*/
@SuppressWarnings("unchecked")
public static final <T> IAutoCompleteRenderer<T> instance()
public static <T> IAutoCompleteRenderer<T> instance()
{
return INSTANCE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public void show(final AjaxRequestTarget target)
* @param target
* Request target associated with current ajax request.
*/
public static final void closeCurrent(final AjaxRequestTarget target)
public static void closeCurrent(final AjaxRequestTarget target)
{
target.appendJavaScript(getCloseJavacriptInternal());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public final class CharSetMap
* @throws IOException
* for an incorrect stream.
*/
protected final static Map<String, String> loadStream(final InputStream input)
protected static Map<String, String> loadStream(final InputStream input)
throws IOException
{
return createMap(input);
Expand Down Expand Up @@ -162,7 +162,7 @@ private static Map<String, String> createMap(final Properties props)
* @throws IOException
* for an incorrect file.
*/
protected final static Map<String, String> loadFile(final File file) throws IOException
protected static Map<String, String> loadFile(final File file) throws IOException
{
return loadStream(new FileInputStream(file));
}
Expand All @@ -176,7 +176,7 @@ protected final static Map<String, String> loadFile(final File file) throws IOEx
* @throws IOException
* for an incorrect file.
*/
protected final static Map<String, String> loadPath(final String path) throws IOException
protected static Map<String, String> loadPath(final String path) throws IOException
{
return loadFile(new File(path));
}
Expand All @@ -188,7 +188,7 @@ protected final static Map<String, String> loadPath(final String path) throws IO
* a resource name.
* @return the mappings.
*/
protected final static Map<String, String> loadResource(final String name)
protected static Map<String, String> loadResource(final String name)
{
final InputStream input = CharSetMap.class.getResourceAsStream(name);
if (input != null)
Expand Down Expand Up @@ -590,4 +590,4 @@ protected final synchronized void setCommonCharSet(final String key, final Strin
mappers.add(MAP_COM, mapper);
mappers.get(MAP_CACHE).clear();
}
}
}

0 comments on commit 2bd2234

Please sign in to comment.