Skip to content

Commit

Permalink
no need private methods to be final
Browse files Browse the repository at this point in the history
IDEA inspections
  • Loading branch information
martin-g committed Mar 27, 2014
1 parent 2bd2234 commit ed8d125
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions wicket-core/src/main/java/org/apache/wicket/Component.java
Expand Up @@ -909,7 +909,7 @@ public final void afterRender()
/**
*
*/
private final void internalBeforeRender()
private void internalBeforeRender()
{
configure();

Expand Down Expand Up @@ -1399,7 +1399,7 @@ public final Localizer getLocalizer()
*
* @return first component tag
*/
private final ComponentTag getMarkupTag()
private ComponentTag getMarkupTag()
{
IMarkupFragment markup = getMarkup();
if (markup != null)
Expand Down Expand Up @@ -2353,7 +2353,7 @@ public final void render()
/**
* Performs a render of this component as part of a Page level render process.
*/
private final void internalRender()
private void internalRender()
{
// Make sure there is a markup available for the Component
IMarkupFragment markup = getMarkup();
Expand Down
Expand Up @@ -372,7 +372,7 @@ private boolean match()
/**
* Scan a possible common suffix
*/
private final void scanLiteralPrefix()
private void scanLiteralPrefix()
{
// scan a common literal suffix
while (ipat < lpat &&
Expand Down Expand Up @@ -401,7 +401,7 @@ private final void scanLiteralPrefix()
*
* @return Whether the all the mentioned characters match each other
*/
private final boolean strncmp(final char[] a1, final int o1, final char[] a2, final int o2,
private boolean strncmp(final char[] a1, final int o1, final char[] a2, final int o2,
final int l)
{
int i = 0;
Expand All @@ -414,7 +414,7 @@ private final boolean strncmp(final char[] a1, final int o1, final char[] a2, fi
return i == l;
}

private final boolean checkEnds(final int sipat, final boolean isSingleStart)
private boolean checkEnds(final int sipat, final boolean isSingleStart)
{
// if the remaining length of the string isn't the same as that found in the pattern
// we do not match
Expand Down
Expand Up @@ -432,7 +432,7 @@ protected Markup getMarkupFromCache(final String cacheKey, final MarkupContainer
* reloaded. Whatever is in the cache, it will be ignored
* @return The markup. Markup.NO_MARKUP, if not found.
*/
private final Markup loadMarkup(final MarkupContainer container,
private Markup loadMarkup(final MarkupContainer container,
final MarkupResourceStream markupResourceStream, final boolean enforceReload)
{
String cacheKey = markupResourceStream.getCacheKey();
Expand Down Expand Up @@ -486,7 +486,7 @@ private final Markup loadMarkup(final MarkupContainer container,
* reloaded. Whatever is in the cache, it will be ignored
* @return The markup in the stream
*/
private final Markup loadMarkupAndWatchForChanges(final MarkupContainer container,
private Markup loadMarkupAndWatchForChanges(final MarkupContainer container,
final MarkupResourceStream markupResourceStream, final boolean enforceReload)
{
// @TODO the following code sequence looks very much like in loadMarkup. Can it be
Expand Down
Expand Up @@ -191,7 +191,7 @@ public final int size()
/**
* @return The parent markup. Null if that is a a markup file.
*/
private final IMarkupFragment getParentMarkup()
private IMarkupFragment getParentMarkup()
{
return markup;
}
Expand Down
Expand Up @@ -490,7 +490,7 @@ public IMarkupFragment getMarkup()
* @param name
* @return null, if not found
*/
private final IMarkupFragment findByName(final IMarkupFragment markup, final String name)
private IMarkupFragment findByName(final IMarkupFragment markup, final String name)
{
Args.notEmpty(name, "name");

Expand Down
Expand Up @@ -1772,7 +1772,7 @@ protected final void updateFormComponentModels()
*
* @see #updateFormComponentModels()
*/
private final void updateNestedFormComponentModels()
private void updateNestedFormComponentModels()
{
visitChildren(Form.class, new IVisitor<Form<?>, Void>()
{
Expand Down
Expand Up @@ -225,7 +225,7 @@ public Charset getCharset()
* the url
* @return the imported contents
*/
private final String importUrl(URL url)
private String importUrl(URL url)
{
return ResourceUtil.readString(new UrlResourceStream(url), getCharset());
}
Expand Down
Expand Up @@ -134,7 +134,7 @@ public IMarkupFragment getMarkup(final MarkupContainer parent, final Component c
* @param markup
* @return null, if not found
*/
private final IMarkupFragment findStartTag(final IMarkupFragment markup)
private IMarkupFragment findStartTag(final IMarkupFragment markup)
{
MarkupStream stream = new MarkupStream(markup);

Expand Down Expand Up @@ -310,7 +310,7 @@ private String getHeaderId(final Component container, final MarkupStream markupS
* @param markup
* @return the header part for this panel/border or null if it doesn't have a wicket:head tag.
*/
private final HeaderPartContainer getHeaderPart(final WebMarkupContainer container,
private HeaderPartContainer getHeaderPart(final WebMarkupContainer container,
final String id, final IMarkupFragment markup)
{
// Create a HtmlHeaderContainer for the header tag found
Expand All @@ -335,7 +335,7 @@ private final HeaderPartContainer getHeaderPart(final WebMarkupContainer contain
* @param associatedMarkupStream
* @return index or -1 when done
*/
private final int nextHeaderMarkup(final MarkupStream associatedMarkupStream)
private int nextHeaderMarkup(final MarkupStream associatedMarkupStream)
{
// No associated markup => no header section
if (associatedMarkupStream == null)
Expand Down
Expand Up @@ -110,7 +110,7 @@ public final CharSequence getInput(final int fromPos, final int toPos)
*
* @throws ParseException
*/
private final void skipUntil() throws ParseException
private void skipUntil() throws ParseException
{
// this is a tag with non-XHTML text as body - skip this until the
// skipUntilText is found.
Expand Down
Expand Up @@ -101,7 +101,7 @@ else if (inHead == true)
* @param tag
* @return true, if id is needed
*/
private final boolean needId(final ComponentTag tag)
private boolean needId(final ComponentTag tag)
{
final String name = tag.getName().toLowerCase();
if (name.equals("script") && tag.getAttributes().containsKey("src") == false)
Expand All @@ -120,7 +120,7 @@ else if (name.equals("style") && tag.getAttributes().containsKey("href") == fals
*
* @return The next value
*/
private final int nextValue()
private int nextValue()
{
return counter++;
}
Expand Down
Expand Up @@ -195,7 +195,7 @@ protected boolean analyzeAutolinkCondition(final ComponentTag tag)
* @param ref
* @return true if ref is not null and does not contain namespace
*/
private final boolean checkRef(String ref)
private boolean checkRef(String ref)
{
return (ref != null) && (!ref.contains(":"));
}
Expand Down
Expand Up @@ -875,7 +875,7 @@ public final Component resolve(final MarkupContainer container,
* the component tag
* @return A BookmarkablePageLink<?> to handle the href
*/
private final Component resolveAutomaticLink(final PathInfo pathInfo, final String id,
private Component resolveAutomaticLink(final PathInfo pathInfo, final String id,
final ComponentTag tag)
{
final MarkupContainer container = pathInfo.getContainer();
Expand Down
Expand Up @@ -141,7 +141,7 @@ public void run()
*
* @param code
*/
private final void execute(final Runnable code)
private void execute(final Runnable code)
{
// Temporarily replace the web response with a String response
final Response webResponse = getResponse();
Expand Down
Expand Up @@ -331,7 +331,7 @@ protected void renderHeadInit(IHeaderResponse response)
* @throws UnableToDetermineFormatException
* if this date picker is unable to determine a format.
*/
private final void checkComponentProvidesDateFormat(final Component component)
private void checkComponentProvidesDateFormat(final Component component)
{
if (getDatePattern() == null)
{
Expand Down
Expand Up @@ -148,7 +148,7 @@ protected List<String> load()
return get(getPageTargetClass());
}

private final void addResources(final AppendingStringBuffer relativePath, final File dir,
private void addResources(final AppendingStringBuffer relativePath, final File dir,
List<String> resources)
{
File[] files = dir.listFiles();
Expand Down
Expand Up @@ -84,7 +84,7 @@ public final BreadCrumbPanel create(final String componentId,
*
* @return The constructor.
*/
private final Constructor<? extends BreadCrumbPanel> getConstructor()
private Constructor<? extends BreadCrumbPanel> getConstructor()
{
try
{
Expand Down
Expand Up @@ -142,7 +142,7 @@ public void validate(final Form<?> form)
/**
* @return whether the step this wrapper is part of is the current step
*/
private final boolean isActiveStep()
private boolean isActiveStep()
{
return (wizardModel.getActiveStep().equals(WizardStep.this));
}
Expand Down
Expand Up @@ -142,7 +142,7 @@ protected abstract byte[] crypt(final byte[] input, final int mode)
* byte array to decrypt
* @return the decrypted text
*/
private final byte[] decryptByteArray(final byte[] encrypted)
private byte[] decryptByteArray(final byte[] encrypted)
{
try
{
Expand All @@ -163,7 +163,7 @@ private final byte[] decryptByteArray(final byte[] encrypted)
* @return the string encrypted
* @throws GeneralSecurityException
*/
private final byte[] encryptStringToByteArray(final String plainText)
private byte[] encryptStringToByteArray(final String plainText)
throws GeneralSecurityException
{
try
Expand Down
Expand Up @@ -106,7 +106,7 @@ protected final byte[] crypt(final byte[] input, final int mode)
* @throws InvalidKeySpecException
* invalid encryption key
*/
private final SecretKey generateSecretKey() throws NoSuchAlgorithmException,
private SecretKey generateSecretKey() throws NoSuchAlgorithmException,
InvalidKeySpecException
{
final PBEKeySpec spec = new PBEKeySpec(getKey().toCharArray());
Expand Down
Expand Up @@ -134,7 +134,7 @@ public void init() throws IOException
* The xmlDecl string
* @return The encoding. Null, if not found
*/
private final String determineEncoding(final CharSequence string)
private String determineEncoding(final CharSequence string)
{
// Does the string match the <?xml .. ?> pattern
final Matcher matcher = encodingPattern.matcher(string);
Expand Down Expand Up @@ -172,7 +172,7 @@ private final String determineEncoding(final CharSequence string)
* @return true, if &lt;?xml ..?&gt; has been found
* @throws IOException
*/
private final String getXmlDeclaration(final InputStream in, final int readAheadSize)
private String getXmlDeclaration(final InputStream in, final int readAheadSize)
throws IOException
{
// Max one line
Expand Down

0 comments on commit ed8d125

Please sign in to comment.