roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1542706 - in /roller/trunk/app/src/main/java/org/apache/roller: util/ weblogger/business/ weblogger/business/jpa/ weblogger/business/plugins/comment/ weblogger/business/plugins/entry/ weblogger/business/runnable/ weblogger/business/startup...
Date Sun, 17 Nov 2013 11:22:36 GMT
Author: gmazza
Date: Sun Nov 17 11:22:34 2013
New Revision: 1542706

URL: http://svn.apache.org/r1542706
Log:
Various Sonar complaints fixed.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/HTMLSubsetPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/LinkMarkupPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/WebloggerStartup.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetConfig.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/security/CustomUserRegistry.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/WeblogCalendarModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Setup.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Bookmarks.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/CommentsPager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/EntriesPager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nMessages.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/IPBanList.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Trackback.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/WSSEUtilities.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Handler.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/RollerMemberHandler.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AccessTokenServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AuthorizationServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/RequestTokenServlet.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java Sun Nov 17 11:22:34 2013
@@ -30,17 +30,17 @@ import org.apache.commons.codec.binary.H
  */
 public final class RegexUtil {
     
-    public static final Pattern mailtoPattern = 
+    public static final Pattern MAILTO_PATTERN =
             Pattern.compile("mailto:([a-zA-Z0-9\\.]+@[a-zA-Z0-9\\.]+\\.[a-zA-Z0-9]+)");
     
-    public static final Pattern emailPattern = 
+    public static final Pattern EMAIL_PATTERN =
             Pattern.compile("\\b[a-zA-Z0-9\\.]+(@)([a-zA-Z0-9\\.]+)(\\.)([a-zA-Z0-9]+)\\b");
     
     
     public static String encodeEmail(String str) {
         // obfuscate mailto's: turns them into hex encoded,
         // so that browsers can still understand the mailto link
-        Matcher mailtoMatch = mailtoPattern.matcher(str);
+        Matcher mailtoMatch = MAILTO_PATTERN.matcher(str);
         while (mailtoMatch.find()) {
             String email = mailtoMatch.group(1);
             //System.out.println("email=" + email);
@@ -58,7 +58,7 @@ public final class RegexUtil {
      * machines to parse however.
      */
     public static String obfuscateEmail(String str) {
-        Matcher emailMatch = emailPattern.matcher(str);
+        Matcher emailMatch = EMAIL_PATTERN.matcher(str);
         while (emailMatch.find()) {
             String at = emailMatch.group(1);
             //System.out.println("at=" + at);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java Sun Nov 17 11:22:34 2013
@@ -37,7 +37,7 @@ import org.apache.roller.weblogger.confi
  */
 public class MailProvider {
     
-    private static final Log log = LogFactory.getLog(MailProvider.class);
+    private static final Log LOG = LogFactory.getLog(MailProvider.class);
     
     private enum ConfigurationType {JNDI_NAME, MAIL_PROPERTIES; }
     
@@ -45,7 +45,6 @@ public class MailProvider {
     
     private ConfigurationType type = ConfigurationType.JNDI_NAME;
     
-    private String jndiName = null;
     private String mailHostname = null;
     private int    mailPort = -1;
     private String mailUsername = null;
@@ -58,7 +57,7 @@ public class MailProvider {
         if ("properties".equals(connectionTypeString)) {
             type = ConfigurationType.MAIL_PROPERTIES;
         }
-        jndiName =     WebloggerConfig.getProperty("mail.jndi.name");
+        String jndiName =     WebloggerConfig.getProperty("mail.jndi.name");
         mailHostname = WebloggerConfig.getProperty("mail.hostname");
         mailUsername = WebloggerConfig.getProperty("mail.username");
         mailPassword = WebloggerConfig.getProperty("mail.password");
@@ -68,7 +67,7 @@ public class MailProvider {
                 mailPort = Integer.parseInt(portString);
             }
         } catch (Exception e) {
-            log.warn("mail server port not a valid integer, ignoring");
+            LOG.warn("mail server port not a valid integer, ignoring");
         }
         
         // init and connect now so we fail early

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java Sun Nov 17 11:22:34 2013
@@ -25,7 +25,6 @@ import javax.persistence.Query;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
-import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.pings.PingQueueManager;
 import org.apache.roller.weblogger.pojos.AutoPing;
 import org.apache.roller.weblogger.pojos.PingQueueEntry;
@@ -43,16 +42,14 @@ public class JPAPingQueueManagerImpl imp
         JPAPingQueueManagerImpl.class);
 
     /** The strategy for this manager. */
-    private final Weblogger roller;
     private final JPAPersistenceStrategy strategy;
-    
+
 
     /**
      * Creates a new instance of JPAPingQueueManagerImpl
      */
     @com.google.inject.Inject
-    protected JPAPingQueueManagerImpl(Weblogger roller, JPAPersistenceStrategy strategy) {
-        this.roller = roller;
+    protected JPAPingQueueManagerImpl(JPAPersistenceStrategy strategy) {
         this.strategy =  strategy;
     }
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingTargetManagerImpl.java Sun Nov 17 11:22:34 2013
@@ -29,7 +29,6 @@ import javax.persistence.Query;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
-import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.pings.PingTargetManager;
 import org.apache.roller.weblogger.pojos.PingTarget;
 import org.apache.roller.weblogger.pojos.Weblog;
@@ -47,13 +46,11 @@ public class JPAPingTargetManagerImpl im
     private static Log log = LogFactory.getLog(
         JPAPingTargetManagerImpl.class);
 
-    private final Weblogger roller;
     private final JPAPersistenceStrategy strategy;
     
     
     @com.google.inject.Inject
-    protected JPAPingTargetManagerImpl(Weblogger roller, JPAPersistenceStrategy strategy) {
-        this.roller = roller;
+    protected JPAPingTargetManagerImpl(JPAPersistenceStrategy strategy) {
         this.strategy = strategy;
     }
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java Sun Nov 17 11:22:34 2013
@@ -1428,15 +1428,15 @@ public class JPAWeblogEntryManagerImpl i
         //Append tags as parameter markers to avoid potential escaping issues
         //The IN clause would be of form (?1, ?2, ?3, ..)
         ArrayList params = new ArrayList(tags.size() + 1);
-        final String PARAM_SEPARATOR = ", ";
+        final String paramSeparator = ", ";
         int i;
         for (i=0; i < tags.size(); i++) {
-            queryString.append('?').append(i+1).append(PARAM_SEPARATOR);
+            queryString.append('?').append(i+1).append(paramSeparator);
             params.add(tags.get(i));
         }
         
-        // Remove the trailing PARAM_SEPARATOR
-        queryString.delete(queryString.length() - PARAM_SEPARATOR.length(),
+        // Remove the trailing paramSeparator
+        queryString.delete(queryString.length() - paramSeparator.length(),
                 queryString.length());
         // Close the brace of IN clause
         queryString.append(')');

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java Sun Nov 17 11:22:34 2013
@@ -31,7 +31,7 @@ import org.apache.roller.weblogger.pojos
  */
 public class AutoformatPlugin implements WeblogEntryCommentPlugin {
     
-    private static final Log log = LogFactory.getLog(AutoformatPlugin.class);
+    private static final Log LOG = LogFactory.getLog(AutoformatPlugin.class);
     
     
     public AutoformatPlugin() {
@@ -59,7 +59,7 @@ public class AutoformatPlugin implements
     
     public String render(final WeblogEntryComment comment, String text) {
         
-        log.debug("starting value:\n"+text);
+        LOG.debug("starting value:\n" + text);
         
         /* 
          * setup a buffered reader and iterate through each line
@@ -98,10 +98,10 @@ public class AutoformatPlugin implements
             }
             
         } catch(Exception e) {
-            log.warn("trouble rendering text.", e);
+            LOG.warn("trouble rendering text.", e);
         }
         
-        log.debug("ending value:\n"+buf.toString());
+        LOG.debug("ending value:\n" + buf.toString());
         
         return buf.toString();
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/HTMLSubsetPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/HTMLSubsetPlugin.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/HTMLSubsetPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/HTMLSubsetPlugin.java Sun Nov 17 11:22:34 2013
@@ -28,11 +28,11 @@ import org.apache.roller.weblogger.util.
  * Transforms the given String into a subset of HTML.
  */
 public class HTMLSubsetPlugin implements WeblogEntryCommentPlugin {
-    private static final Log log = LogFactory.getLog(HTMLSubsetPlugin.class);
+    private static final Log LOG = LogFactory.getLog(HTMLSubsetPlugin.class);
     
     
     public HTMLSubsetPlugin() {
-        log.debug("Instantiating HTMLSubsetPlugin");
+        LOG.debug("Instantiating HTMLSubsetPlugin");
     }
     
     
@@ -59,14 +59,14 @@ public class HTMLSubsetPlugin implements
         
         // only do this if comment is HTML
         if ("text/html".equals(comment.getContentType())) {
-            log.debug("ending value:\n" + output);
+            LOG.debug("ending value:\n" + output);
             	        
 	        // escape html
 	        output = Utilities.escapeHTML(output);
 	        
 	        // just use old utilities method
 	        output = Utilities.transformToHTMLSubset(output);
-	        log.debug("starting value:\n"+text);
+	        LOG.debug("starting value:\n" + text);
         }
                 
         return output;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/LinkMarkupPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/LinkMarkupPlugin.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/LinkMarkupPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/LinkMarkupPlugin.java Sun Nov 17 11:22:34 2013
@@ -34,13 +34,13 @@ import org.apache.roller.weblogger.util.
  * Contributed by Matthew Montgomery.
  */
 public class LinkMarkupPlugin implements WeblogEntryCommentPlugin {
-    private static final Log log = LogFactory.getLog(LinkMarkupPlugin.class);
+    private static final Log LOG = LogFactory.getLog(LinkMarkupPlugin.class);
 
     private static final Pattern pattern = Pattern.compile(
             "http[s]?://[^/][\\S]+", Pattern.CASE_INSENSITIVE);  
     
     public LinkMarkupPlugin() {
-        log.debug("Instantiating LinkMarkupPlugin");
+        LOG.debug("Instantiating LinkMarkupPlugin");
     }
     
     /**

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java Sun Nov 17 11:22:34 2013
@@ -43,7 +43,7 @@ import org.apache.roller.weblogger.pojos
  */
 public class AcronymsPlugin implements WeblogEntryPlugin {
     
-    private static final Log mLogger = LogFactory.getLog(AcronymsPlugin.class);
+    private static final Log LOG = LogFactory.getLog(AcronymsPlugin.class);
     
     protected String name = "Acronyms";
     protected String description = "Expands acronyms defined in _acronym page. " +
@@ -56,7 +56,7 @@ public class AcronymsPlugin implements W
     
     public AcronymsPlugin() {
         super();
-        mLogger.debug("AcronymsPlugin instantiated.");
+        LOG.debug("AcronymsPlugin instantiated.");
     }
     
     
@@ -76,15 +76,15 @@ public class AcronymsPlugin implements W
     public String render(WeblogEntry entry, String str) {
         String text = str;
         
-        if (mLogger.isDebugEnabled()) {
-            mLogger.debug("render(entry = "+entry.getId()+")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("render(entry = "+entry.getId()+")");
         }
         
         /*
          * Get acronyms Properties.
          */
         Properties acronyms = loadAcronyms(entry.getWebsite());
-        mLogger.debug("acronyms.size()=" + acronyms.size());
+        LOG.debug("acronyms.size()=" + acronyms.size());
         if (acronyms.size() == 0) {
             return text;
         }
@@ -98,7 +98,7 @@ public class AcronymsPlugin implements W
         for (Iterator iter = acronyms.keySet().iterator(); iter.hasNext();) {
             String acronym = (String) iter.next();
             acronymPatterns[count] = Pattern.compile("\\b" + acronym + "\\b");
-            mLogger.debug("match '" + acronym + "'");
+            LOG.debug("match '" + acronym + "'");
             acronymTags[count] =
                     "<acronym title=\""
                     + acronyms.getProperty(acronym)
@@ -134,7 +134,7 @@ public class AcronymsPlugin implements W
             }
         } catch (WebloggerException e) {
             // not much we can do about it
-            mLogger.warn(e);
+            LOG.warn(e);
         }
         return acronyms;
     }
@@ -149,8 +149,8 @@ public class AcronymsPlugin implements W
      * @return entry text with acronym explanations
      */
     private String matchAcronyms(String text, Pattern[] acronymPatterns, String[] acronymTags) {
-        if (mLogger.isDebugEnabled()) {
-            mLogger.debug("matchAcronyms("+text+")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("matchAcronyms("+text+")");
         }
         
         Matcher matcher = null;
@@ -171,8 +171,8 @@ public class AcronymsPlugin implements W
     private Properties parseAcronymPage(WeblogTemplate acronymPage, Properties acronyms) {
         String rawAcronyms = acronymPage.getContents();
         
-        if (mLogger.isDebugEnabled()) {
-            mLogger.debug("parsing _acronyms template: \n'"+rawAcronyms+"'");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("parsing _acronyms template: \n'"+rawAcronyms+"'");
         }
         
         String regex = "\n"; // end of line

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java Sun Nov 17 11:22:34 2013
@@ -37,12 +37,12 @@ import java.util.regex.Pattern;
  * @version 2.1
  */
 public class GoogleLinkPlugin extends SearchPluginBase implements WeblogEntryPlugin {
-    private static final String version = "2.1";
-    private static final Pattern pattern = Pattern.compile("google([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
-    private static final MessageFormat linkFormat = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}\">{2}</a>");
-    private static final MessageFormat luckyLinkFormat = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}&btnI=on\">{2}</a>");
+    private static final String VERSION = "2.1";
+    private static final Pattern PATTERN = Pattern.compile("google([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
+    private static final MessageFormat LINK_FORMAT = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}\">{2}</a>");
+    private static final MessageFormat LUCKY_LINK_FORMAT = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}&btnI=on\">{2}</a>");
 
-    private static final Log mLogger = LogFactory.getFactory().getInstance(GoogleLinkPlugin.class);
+    private static final Log LOG = LogFactory.getFactory().getInstance(GoogleLinkPlugin.class);
 
     public GoogleLinkPlugin() {
     }
@@ -56,22 +56,22 @@ public class GoogleLinkPlugin extends Se
     }
 
     public String getVersion() {
-        return version;
+        return VERSION;
     }
 
     public Pattern getPattern() {
-        return pattern;
+        return PATTERN;
     }
 
     public MessageFormat getLinkFormat() {
-        return linkFormat;
+        return LINK_FORMAT;
     }
 
     public MessageFormat getLuckyLinkFormat() {
-        return luckyLinkFormat;
+        return LUCKY_LINK_FORMAT;
     }
 
     public Log getLogger() {
-        return mLogger;
+        return LOG;
     }
 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java Sun Nov 17 11:22:34 2013
@@ -37,12 +37,12 @@ import java.util.regex.Pattern;
  * @version 2.1
  */
 public class WikipediaLinkPlugin extends SearchPluginBase implements WeblogEntryPlugin {
-    private static final String version = "2.1";
-    private static final Pattern pattern = Pattern.compile("wikipedia([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
-    private static final MessageFormat linkFormat = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}\">{2}</a>");
-    private static final MessageFormat luckyLinkFormat = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}&go=Go\">{2}</a>");
+    private static final String VERSION = "2.1";
+    private static final Pattern PATTERN = Pattern.compile("wikipedia([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
+    private static final MessageFormat LINK_FORMAT = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}\">{2}</a>");
+    private static final MessageFormat LUCKY_LINK_FORMAT = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}&go=Go\">{2}</a>");
 
-    private static final Log mLogger = LogFactory.getFactory().getInstance(WikipediaLinkPlugin.class);
+    private static final Log LOG = LogFactory.getFactory().getInstance(WikipediaLinkPlugin.class);
 
     public WikipediaLinkPlugin() {
     }
@@ -56,22 +56,22 @@ public class WikipediaLinkPlugin extends
     }
 
     public String getVersion() {
-        return version;
+        return VERSION;
     }
 
     public Pattern getPattern() {
-        return pattern;
+        return PATTERN;
     }
 
     public MessageFormat getLinkFormat() {
-        return linkFormat;
+        return LINK_FORMAT;
     }
 
     public MessageFormat getLuckyLinkFormat() {
-        return luckyLinkFormat;
+        return LUCKY_LINK_FORMAT;
     }
 
     public Log getLogger() {
-        return mLogger;
+        return LOG;
     }
 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java Sun Nov 17 11:22:34 2013
@@ -39,7 +39,7 @@ import org.apache.roller.weblogger.pojos
 @com.google.inject.Singleton
 public abstract class ThreadManagerImpl implements ThreadManager {
     
-    private static final Log log = LogFactory.getLog(ThreadManagerImpl.class);
+    private static final Log LOG = LogFactory.getLog(ThreadManagerImpl.class);
     
     // our own scheduler thread
     private Thread schedulerThread = null;
@@ -50,7 +50,7 @@ public abstract class ThreadManagerImpl 
     
     public ThreadManagerImpl() {
         
-        log.info("Instantiating Thread Manager");
+        LOG.info("Instantiating Thread Manager");
         
         serviceScheduler = Executors.newCachedThreadPool();
     }
@@ -66,7 +66,7 @@ public abstract class ThreadManagerImpl 
             
             String taskClassName = WebloggerConfig.getProperty("tasks."+taskName+".class");
             if(taskClassName != null) {
-                log.info("Initializing task: "+taskName);
+                LOG.info("Initializing task: " + taskName);
                 
                 try {
                     Class taskClass = Class.forName(taskClassName);
@@ -76,7 +76,7 @@ public abstract class ThreadManagerImpl 
                     // make sure there is a tasklock record in the db
                     TaskLock taskLock = getTaskLockByName(task.getName());
                     if (taskLock == null) {
-                        log.debug("Task record does not exist, inserting empty record to start with");
+                        LOG.debug("Task record does not exist, inserting empty record to start with");
 
                         // insert an empty record
                         taskLock = new TaskLock();
@@ -93,11 +93,11 @@ public abstract class ThreadManagerImpl 
                     webloggerTasks.add(task);
                     
                 } catch (ClassCastException ex) {
-                    log.warn("Task does not extend RollerTask class", ex);
+                    LOG.warn("Task does not extend RollerTask class", ex);
                 } catch (WebloggerException ex) {
-                    log.error("Error scheduling task", ex);
+                    LOG.error("Error scheduling task", ex);
                 } catch (Exception ex) {
-                    log.error("Error instantiating task", ex);
+                    LOG.error("Error instantiating task", ex);
                 }
             }
         }
@@ -107,7 +107,7 @@ public abstract class ThreadManagerImpl 
         
         // start scheduler thread, but only if it's not already running
         if (schedulerThread == null && scheduler != null) {
-            log.debug("Starting scheduler thread");
+            LOG.debug("Starting scheduler thread");
             schedulerThread = new Thread(scheduler, "Roller Weblogger Task Scheduler");
             // set thread priority between MAX and NORM so we get slightly preferential treatment
             schedulerThread.setPriority((Thread.MAX_PRIORITY + Thread.NORM_PRIORITY)/2);
@@ -137,14 +137,14 @@ public abstract class ThreadManagerImpl 
     
     public void shutdown() {
         
-        log.debug("starting shutdown sequence");
+        LOG.debug("starting shutdown sequence");
         
         // trigger an immediate shutdown of any backgrounded tasks
         serviceScheduler.shutdownNow();
         
         // only stop if we are already running
         if(schedulerThread != null) {
-            log.debug("Stopping scheduler");
+            LOG.debug("Stopping scheduler");
             schedulerThread.interrupt();
         }
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java Sun Nov 17 11:22:34 2013
@@ -171,13 +171,17 @@ public class DatabaseInstaller {
             
         } catch (SQLException sqle) {
             log.error("ERROR running SQL in database creation script", sqle);
-            if (create != null) messages.addAll(create.getMessages());
+            if (create != null) {
+                messages.addAll(create.getMessages());
+            }
             errorMessage("ERROR running SQL in database creation script");
             throw new StartupException("Error running sql script", sqle); 
             
         } catch (Exception ioe) {
             log.error("ERROR running database creation script", ioe);
-            if (create != null) messages.addAll(create.getMessages());
+            if (create != null) {
+                messages.addAll(create.getMessages());
+            }
             errorMessage("ERROR reading/parsing database creation script");
             throw new StartupException("Error running SQL script", ioe);
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/WebloggerStartup.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/WebloggerStartup.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/WebloggerStartup.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/startup/WebloggerStartup.java Sun Nov 17 11:22:34 2013
@@ -31,7 +31,7 @@ import org.apache.roller.weblogger.confi
  */
 public final class WebloggerStartup {
     
-    private static final Log log = LogFactory.getLog(WebloggerStartup.class);
+    private static final Log LOG = LogFactory.getLog(WebloggerStartup.class);
     
     private static boolean prepared = false;
     
@@ -176,12 +176,12 @@ public final class WebloggerStartup {
         try {
             mailProvider = new MailProvider();
         } catch(StartupException ex) {
-            if (log.isDebugEnabled()) {
-                log.debug("Failed to setup mail provider, continuing anyways.\n"
-                    + "Reason: " + ex.getMessage(), ex);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Failed to setup mail provider, continuing anyways.\n"
+                        + "Reason: " + ex.getMessage(), ex);
             } else {
-                log.warn("Failed to setup mail provider, continuing anyways.\n"
-                    + "Reason: " + ex.getMessage());
+                LOG.warn("Failed to setup mail provider, continuing anyways.\n"
+                        + "Reason: " + ex.getMessage());
             }
         }
         

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java Sun Nov 17 11:22:34 2013
@@ -18,7 +18,6 @@
 
 package org.apache.roller.weblogger.business.themes;
 
-import org.apache.roller.weblogger.pojos.TemplateCode;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetConfig.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetConfig.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetConfig.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetConfig.java Sun Nov 17 11:22:34 2013
@@ -125,10 +125,7 @@ public class PlanetConfig extends Planet
                 if( updProp.getValue() != null // null check needed w/Oracle
                         && (updProp.getValue().equals("true") || updProp.getValue().equals("false"))) {
                     
-                    if(incomingProp == null || !incomingProp.equals("on"))
-                        incomingProp = "false";
-                    else
-                        incomingProp = "true";
+                    incomingProp = (incomingProp == null || !incomingProp.equals("on")) ? "false" : "true";
                 }
                 
                 // only work on props that were submitted with the request

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java Sun Nov 17 11:22:34 2013
@@ -260,7 +260,7 @@ public class MediaFileDirectory {
         if (other == this) {
             return true;
         }
-        if (other instanceof MediaFileDirectory != true) {
+        if (!(other instanceof MediaFileDirectory)) {
             return false;
         }
         MediaFileDirectory o = (MediaFileDirectory) other;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/security/CustomUserRegistry.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/security/CustomUserRegistry.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/security/CustomUserRegistry.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/security/CustomUserRegistry.java Sun Nov 17 11:22:34 2013
@@ -40,7 +40,7 @@ import org.apache.roller.weblogger.pojos
  */
 public class CustomUserRegistry {
     
-    private static final Log log = LogFactory.getLog(CustomUserRegistry.class);
+    private static final Log LOG = LogFactory.getLog(CustomUserRegistry.class);
 
     private static final String DEFAULT_SNAME_LDAP_ATTRIBUTE = "screenname";
     private static final String DEFAULT_UID_LDAP_ATTRIBUTE = "uid";
@@ -60,7 +60,7 @@ public class CustomUserRegistry {
 
         boolean usingSSO = WebloggerConfig.getBooleanProperty("users.sso.enabled");
         if(!usingSSO) {
-            log.info("SSO is not enabled. Skipping CustomUserRegistry functionality.");
+            LOG.info("SSO is not enabled. Skipping CustomUserRegistry functionality.");
             return null;
         }
         
@@ -100,7 +100,7 @@ public class CustomUserRegistry {
             if (userName == null && fullName == null && screenName == null &&
                     email == null && locale == null && timezone == null) {
 
-                log.warn("No Authentication found in SecurityContextHolder and HttpServletRequest.");
+                LOG.warn("No Authentication found in SecurityContextHolder and HttpServletRequest.");
                 return null;
             } else {
                 enabled = true;
@@ -110,12 +110,12 @@ public class CustomUserRegistry {
             Object oPrincipal = authentication.getPrincipal();
         
             if(oPrincipal == null) {
-                log.warn("Principal is null. Skipping auto-registration.");
+                LOG.warn("Principal is null. Skipping auto-registration.");
                 return null;
             }
         
             if (!(oPrincipal instanceof UserDetails)) {
-                log.warn("Unsupported Principal type in Authentication. Skipping auto-registration.");
+                LOG.warn("Unsupported Principal type in Authentication. Skipping auto-registration.");
                 return null;
             }
         

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java Sun Nov 17 11:22:34 2013
@@ -39,10 +39,10 @@ public class BigWeblogCalendarModel exte
     
     private static Log mLogger = LogFactory.getLog(BigWeblogCalendarModel.class);
     
-    protected static final SimpleDateFormat mStarDateFormat =
+    protected static final SimpleDateFormat STAR_DATE_FORMAT =
             DateUtil.get8charDateFormat();
     
-    protected static final SimpleDateFormat mSingleDayFormat =
+    protected static final SimpleDateFormat SINGLE_DAY_FORMAT =
             new SimpleDateFormat("dd");
     
     
@@ -80,7 +80,7 @@ public class BigWeblogCalendarModel exte
             String dateString = null;
             List entries = (List)monthMap.get(day);
             if ( entries != null ) {
-                dateString = mStarDateFormat.format(
+                dateString = STAR_DATE_FORMAT.format(
                         ((WeblogEntry)entries.get(0)).getPubTime());
                 
                 // append 8 char date string on end of selfurl
@@ -90,7 +90,7 @@ public class BigWeblogCalendarModel exte
                 sb.append("<a href=\"");
                 sb.append( dayUrl );
                 sb.append("\">");
-                sb.append( mSingleDayFormat.format( day ) );
+                sb.append(SINGLE_DAY_FORMAT.format(day));
                 sb.append("</a></div>");
                 
                 for ( int i=0; i<entries.size(); i++ ) {
@@ -113,7 +113,7 @@ public class BigWeblogCalendarModel exte
                 
             } else {
                 sb.append("<div class=\"hCalendarDayTitleBig\">");
-                sb.append( mSingleDayFormat.format( day ) );
+                sb.append(SINGLE_DAY_FORMAT.format(day));
                 sb.append("</div>");
                 sb.append("<div class=\"bCalendarDayContentBig\"/>");
             }
@@ -139,9 +139,11 @@ public class BigWeblogCalendarModel exte
         List entries = (List)monthMap.get( day );
         if ( entries != null && day != null ) {
             WeblogEntry entry = (WeblogEntry)entries.get(0);
-            dateString = mStarDateFormat.format(entry.getPubTime());
+            dateString = STAR_DATE_FORMAT.format(entry.getPubTime());
+        }
+        if (dateString == null && !alwaysURL) {
+            return null;
         }
-        if (dateString == null && !alwaysURL) return null;
         else if (dateString == null && !nextPrevMonthURL) {
             dateString = DateUtil.format8chars(day);
         } else if (dateString == null && nextPrevMonthURL) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/WeblogCalendarModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/WeblogCalendarModel.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/WeblogCalendarModel.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/WeblogCalendarModel.java Sun Nov 17 11:22:34 2013
@@ -273,7 +273,9 @@ public class WeblogCalendarModel impleme
         String url = null;
         // get the 8 char YYYYMMDD datestring for day
         String dateString = (String)monthMap.get(day);
-        if (dateString == null && !alwaysURL) return null;
+        if (dateString == null && !alwaysURL) {
+            return null;
+        }
         else if (dateString == null && !monthURL) {
             dateString = DateUtil.format8chars(day);
         	dateString = format8chars(day,getCalendar());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java Sun Nov 17 11:22:34 2013
@@ -34,8 +34,7 @@ public class PreviewURLModel extends URL
     
     private WeblogPreviewRequest previewRequest = null;
     private Weblog weblog = null;
-    private String locale = null;
-    
+
     private URLStrategy urlStrategy = null;
     
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java Sun Nov 17 11:22:34 2013
@@ -86,7 +86,9 @@ public class AkismetCommentValidator imp
                 messages.addError("comment.validator.akismetMessage");
                 return 0;
             }
-            else return 100;
+            else {
+                return 100;
+            }
         } catch (Exception e) {
             log.error("ERROR checking comment against Akismet", e);
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java Sun Nov 17 11:22:34 2013
@@ -40,7 +40,6 @@ import org.apache.roller.weblogger.pojos
 import org.apache.roller.weblogger.ui.rendering.Renderer;
 import org.apache.roller.weblogger.ui.rendering.RendererManager;
 import org.apache.roller.weblogger.ui.rendering.mobile.MobileDeviceRepository.DeviceType;
-import org.apache.roller.weblogger.ui.rendering.model.Model;
 import org.apache.roller.weblogger.ui.rendering.model.UtilitiesModel;
 import org.apache.roller.weblogger.ui.rendering.util.cache.PlanetCache;
 import org.apache.roller.weblogger.ui.rendering.util.PlanetRequest;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java Sun Nov 17 11:22:34 2013
@@ -156,7 +156,9 @@ public class PreviewServlet extends Http
             // if we don't have a custom tags page then 404, we don't let
             // this one fall through to the default template
             if(page == null) {
-                if(!response.isCommitted()) response.reset();
+                if (!response.isCommitted()) {
+                    response.reset();
+                }
                 response.sendError(HttpServletResponse.SC_NOT_FOUND);
                 return;
             }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.java Sun Nov 17 11:22:34 2013
@@ -102,8 +102,9 @@ public class ModDateHeaderUtil {
 				|| (eTag == null || previousToken == null)
 				&& lastModifiedTimeMillis <= sinceDate) {
 
-			if (log.isDebugEnabled())
+			if (log.isDebugEnabled()) {
 				log.debug("NOT MODIFIED " + request.getRequestURL());
+            }
 
 			response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java Sun Nov 17 11:22:34 2013
@@ -57,8 +57,9 @@ public class ThemeResourceLoader extends
     public InputStream getResourceStream(String name)
             throws ResourceNotFoundException {
 
-        if (log.isDebugEnabled())
+        if (log.isDebugEnabled()) {
             logger.debug("Looking for: " + name);
+        }
 
         if (name == null || name.length() < 1) {
             throw new ResourceNotFoundException(
@@ -100,8 +101,9 @@ public class ThemeResourceLoader extends
                 contents = template.getContents();
             }
 
-            if (log.isDebugEnabled())
+            if (log.isDebugEnabled()) {
                 logger.debug("Resource found!");
+            }
 
             // return the input stream
             return new ByteArrayInputStream(contents.getBytes("UTF-8"));

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Setup.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Setup.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Setup.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Setup.java Sun Nov 17 11:22:34 2013
@@ -35,7 +35,7 @@ import org.apache.roller.weblogger.ui.st
  */
 public class Setup extends UIAction {
     
-    private static final Log log = LogFactory.getLog(Setup.class);
+    private static final Log LOG = LogFactory.getLog(Setup.class);
     
     private long userCount = 0;
     private long blogCount = 0;
@@ -66,7 +66,7 @@ public class Setup extends UIAction {
             WeblogManager mgr =  WebloggerFactory.getWeblogger().getWeblogManager();
             setWeblogs(mgr.getWeblogs(true, null, null, null, 0, -1));
         } catch (WebloggerException ex) {
-            log.error("Error getting weblogs", ex);
+            LOG.error("Error getting weblogs", ex);
             addError("frontpageConfig.weblogs.error");
         }
 
@@ -74,7 +74,7 @@ public class Setup extends UIAction {
             setUserCount(WebloggerFactory.getWeblogger().getUserManager().getUserCount());
             setBlogCount(WebloggerFactory.getWeblogger().getWeblogManager().getWeblogCount());
         } catch (WebloggerException ex) {
-            log.error("Error getting user/weblog counts", ex);
+            LOG.error("Error getting user/weblog counts", ex);
         }
         
         return SUCCESS;
@@ -96,7 +96,7 @@ public class Setup extends UIAction {
             addMessage("frontpageConfig.values.saved");
 
         } catch (WebloggerException ex) {
-            log.error("ERROR saving frontpage configuration", ex);
+            LOG.error("ERROR saving frontpage configuration", ex);
             addError("frontpageConfig.values.error");
         }
         return "home";

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Bookmarks.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Bookmarks.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Bookmarks.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Bookmarks.java Sun Nov 17 11:22:34 2013
@@ -176,8 +176,9 @@ public class Bookmarks extends UIAction 
                             + " bookmarks.");
                 }
 				for (int j = 0; j < bookmarks.length; j++) {
-					if (log.isDebugEnabled())
+					if (log.isDebugEnabled()) {
 						log.debug("Deleting bookmark - " + bookmarks[j]);
+                    }
 					bookmark = bmgr.getBookmark(bookmarks[j]);
 					if (bookmark != null) {
 						bmgr.removeBookmark(bookmark);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java Sun Nov 17 11:22:34 2013
@@ -68,7 +68,7 @@ public class EntryRemove extends EntryBa
 
 	public String remove() {
 
-		if (getRemoveEntry() != null)
+		if (getRemoveEntry() != null) {
 			try {
 
 				WeblogEntry entry = getRemoveEntry();
@@ -110,7 +110,7 @@ public class EntryRemove extends EntryBa
 				// TODO: i18n
 				addError("Error removing entry");
 			}
-		else {
+        } else {
 			addError("weblogEntry.notFound");
 			return ERROR;
 		}

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java Sun Nov 17 11:22:34 2013
@@ -63,7 +63,7 @@ public final class WeblogExport extends 
         implements ServletResponseAware {
 
     // Static Variables --------------------------------------------------------
-    private static final Log log = LogFactory.getLog(WeblogExport.class);
+    private static final Log LOG = LogFactory.getLog(WeblogExport.class);
 
     private static final Pattern SC_TAG_PATTERN =
             Pattern.compile("(([\\S])(/>))");
@@ -265,9 +265,9 @@ public final class WeblogExport extends 
                 outputStream.close();
             }
         } catch (WebloggerException e) {
-            log.error("Error looking up entries: ", e);
+            LOG.error("Error looking up entries: ", e);
         } catch (IOException e) {
-            log.error("Error getting output stream: ", e);
+            LOG.error("Error getting output stream: ", e);
         }
     }
 
@@ -338,7 +338,7 @@ public final class WeblogExport extends 
                 zipOutput.flush();
                 zipOutput.close();
             } catch (Exception e) {
-                log.error("Error exporting resources: " + e.getMessage());
+                LOG.error("Error exporting resources: " + e.getMessage());
             }
         }
     }
@@ -363,7 +363,7 @@ public final class WeblogExport extends 
             hostname = absoluteUrl.getHost();
         }
         catch (MalformedURLException e) {
-            log.error("Unable to parse the absolute URL: " + e.getMessage());
+            LOG.error("Unable to parse the absolute URL: " + e.getMessage());
             hostname = "unknown";
         }
 
@@ -456,7 +456,7 @@ public final class WeblogExport extends 
                                     "att_mediacast_length"));
                 }
                 catch (NumberFormatException e) {
-                    log.error("Unable to parse 'att_mediacast_length': " +
+                    LOG.error("Unable to parse 'att_mediacast_length': " +
                             e.getMessage());
                     enclosureLength = (long) 0;
                 }
@@ -693,7 +693,7 @@ public final class WeblogExport extends 
             try {
                 result = baseUrlMatcher.replaceAll("$1" + baseUrl);
             } catch (IllegalArgumentException e) {
-                log.error("Invalid base URL submitted: " + baseUrl + ": " +
+                LOG.error("Invalid base URL submitted: " + baseUrl + ": " +
                         e.getMessage());
             }
         }
@@ -713,7 +713,7 @@ public final class WeblogExport extends 
             // Load the non-directory files
             mfiles.addAll(mdir.getMediaFiles());
         } catch (Exception e) {
-            log.error("Error loading resources: " + e.getMessage());
+            LOG.error("Error loading resources: " + e.getMessage());
         }
     }
 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/CommentsPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/CommentsPager.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/CommentsPager.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/CommentsPager.java Sun Nov 17 11:22:34 2013
@@ -32,8 +32,6 @@ import org.apache.roller.weblogger.util.
  */
 public class CommentsPager {
     
-    private static final Log log = LogFactory.getLog(CommentsPager.class);
-    
     // the collection for the pager
     private final List<WeblogEntryComment> items;
     
@@ -58,7 +56,7 @@ public class CommentsPager {
     public String getNextLink() {
         if(isMoreItems()) {
             int nextPage = pageNum + 1;
-            Map<String, String> params = new HashMap();
+            Map<String, String> params = new HashMap<String, String>();
             params.put("bean.page", ""+nextPage);
             return createURL(baseUrl, params);
         }
@@ -69,7 +67,7 @@ public class CommentsPager {
     public String getPrevLink() {
         if (pageNum > 0) {
             int prevPage = pageNum - 1;
-            Map<String, String> params = new HashMap();
+            Map<String, String> params = new HashMap<String, String>();
             params.put("bean.page", ""+prevPage);
             return createURL(baseUrl, params);
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/EntriesPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/EntriesPager.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/EntriesPager.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/pagers/EntriesPager.java Sun Nov 17 11:22:34 2013
@@ -32,8 +32,6 @@ import org.apache.roller.weblogger.util.
  */
 public class EntriesPager {
     
-    private static final Log log = LogFactory.getLog(EntriesPager.class);
-    
     // the collection for the pager
     private final List<WeblogEntry> items;
     
@@ -58,7 +56,7 @@ public class EntriesPager {
     public String getNextLink() {
         if(isMoreItems()) {
             int nextPage = pageNum + 1;
-            Map<String, String> params = new HashMap();
+            Map<String, String> params = new HashMap<String, String>();
             params.put("bean.page", ""+nextPage);
             return createURL(baseUrl, params);
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java Sun Nov 17 11:22:34 2013
@@ -397,13 +397,17 @@ public abstract class UIAction extends A
     }
 
     public static String cleanTextKey(String s) {
-        if (s == null || s.isEmpty()) return s;
+        if (s == null || s.isEmpty()) {
+            return s;
+        }
         // escape HTML
         return StringEscapeUtils.escapeHtml(cleanExpressions(s));
     }
 
     public static String cleanTextArg(String s) {
-        if (s == null || s.isEmpty()) return s;
+        if (s == null || s.isEmpty()) {
+            return s;
+        }
         return StringEscapeUtils.escapeHtml(s);
     }
 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java Sun Nov 17 11:22:34 2013
@@ -70,7 +70,7 @@ public class Blacklist {
     private static final String LAST_UPDATE_STR = "Last update:";
 
     /** We no longer have a blacklist update URL */
-    private static final String blacklistURL = null; 
+    private static final String BLACKLIST_URL = null;
 
     private Date lastModified = null;
     private List blacklistStr = new LinkedList();
@@ -99,7 +99,7 @@ public class Blacklist {
     
     /** Non-Static update method. */
     public void update() {
-        if (blacklistURL != null) {
+        if (BLACKLIST_URL != null) {
             boolean blacklist_updated = this.downloadBlacklist();
             if (blacklist_updated) {
                 this.loadBlacklistFromFile(null);
@@ -114,7 +114,7 @@ public class Blacklist {
         try {
             mLogger.debug("Attempting to download MT blacklist");
             
-            URL url = new URL(blacklistURL);
+            URL url = new URL(BLACKLIST_URL);
             HttpURLConnection connection = 
                     (HttpURLConnection) url.openConnection();
             
@@ -256,7 +256,9 @@ public class Blacklist {
             mLogger.error(e);
         } finally {
             try {
-                if (in != null) in.close();
+                if (in != null) {
+                    in.close();
+                }
             } catch (IOException e1) {
                 mLogger.error(e1);
             }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nMessages.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nMessages.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nMessages.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nMessages.java Sun Nov 17 11:22:34 2013
@@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFac
  */
 public class I18nMessages {
     
-    private static final Log log = LogFactory.getLog(I18nMessages.class);
+    private static final Log LOG = LogFactory.getLog(I18nMessages.class);
     
     // locale and bundle we are using for messaging
     private final Locale locale;
@@ -65,7 +65,7 @@ public class I18nMessages {
      */
     public static I18nMessages getMessages(String locale) {
         
-        log.debug("request for messages in locale = "+locale);
+        LOG.debug("request for messages in locale = " + locale);
         
         // check if we already have a message utils created for that locale
         I18nMessages messages = messagesMap.get(locale);
@@ -87,7 +87,7 @@ public class I18nMessages {
      */
     public static I18nMessages getMessages(Locale locale) {
         
-        log.debug("request for messages in locale = "+locale.toString());
+        LOG.debug("request for messages in locale = " + locale.toString());
         
         // check if we already have a message utils created for that locale
         I18nMessages messages = messagesMap.get(locale);
@@ -121,7 +121,7 @@ public class I18nMessages {
             return bundle.getString(key);
         } catch (Exception e) {
             // send a warning in the logs
-            log.warn("Error getting key "+key);
+            LOG.warn("Error getting key " + key);
             return key;
         }
     }
@@ -138,7 +138,7 @@ public class I18nMessages {
             return MessageFormat.format(msg, args.toArray());
         } catch (Exception e) {
             // send a warning in the logs
-            log.warn("Error getting key "+key, e);
+            LOG.warn("Error getting key " + key, e);
             return key;
         }
     }
@@ -155,7 +155,7 @@ public class I18nMessages {
             return MessageFormat.format(msg, args);
         } catch (Exception e) {
             // send a warning in the logs
-            log.warn("Error getting key "+key, e);
+            LOG.warn("Error getting key " + key, e);
             return key;
         }
     }
@@ -184,7 +184,7 @@ public class I18nMessages {
 			messagesMap.remove(key);
 
 		} catch (Exception e) {
-			log.error("Error clearing message resource bundles", e);
+			LOG.error("Error clearing message resource bundles", e);
 		}
 
 	}
@@ -205,13 +205,13 @@ public class I18nMessages {
 					.getName())) {
 				clearMap(cl, loader, "resourceEntries");
 			} else {
-				if (log.isDebugEnabled()) {
-					log.debug("class loader " + cl.getName()
+				if (LOG.isDebugEnabled()) {
+					LOG.debug("class loader " + cl.getName()
 							+ " is not tomcat loader.");
 				}
 			}
 		} catch (Exception e) {
-			log.warn("couldn't clear tomcat cache", e);
+			LOG.warn("couldn't clear tomcat cache", e);
 		}
 	}
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/IPBanList.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/IPBanList.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/IPBanList.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/IPBanList.java Sun Nov 17 11:22:34 2013
@@ -185,11 +185,7 @@ public class IPBanList {
         }
 
         public boolean hasChanged() {
-            if(lastModified() != myLastModified) {
-                return true;
-            } else {
-                return false;
-            }
+            return lastModified() != myLastModified;
         }
         
         public void clearChanged() {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java Sun Nov 17 11:22:34 2013
@@ -181,10 +181,10 @@ public class LinkbackExtractor
         {
             count++;
             SyndEntry item = (SyndEntry) itemIter.next();
-            if (item.getDescription().getValue().indexOf(requestURL) != -1)
+            if (item.getDescription().getValue().contains(requestURL))
             {
                 mFound = true;
-                mPermalink = item.getLink().toString();
+                mPermalink = item.getLink();
                 if (feedTitle != null && feedTitle.trim().length() > 0)
                 {
                     mTitle = feedTitle + ": " + item.getTitle();

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java Sun Nov 17 11:22:34 2013
@@ -41,7 +41,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.MailProvider;
 import org.apache.roller.weblogger.business.WebloggerFactory;
-import org.apache.roller.weblogger.business.UserManager;
 import org.apache.roller.weblogger.business.WeblogManager;
 import org.apache.roller.weblogger.business.startup.WebloggerStartup;
 import org.apache.roller.weblogger.config.WebloggerConfig;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastUtil.java Sun Nov 17 11:22:34 2013
@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFac
  */
 public final class MediacastUtil {
     
-    private static final Log log = LogFactory.getLog(MediacastUtil.class);
+    private static final Log LOG = LogFactory.getLog(MediacastUtil.class);
     
     public static final int BAD_URL = 1;
     public static final int CHECK_FAILED = 2;
@@ -60,26 +60,26 @@ public final class MediacastUtil {
             String message = con.getResponseMessage();
             
             if(response != 200) {
-                log.debug("Mediacast error "+response+":"+message+" from url "+url);
+                LOG.debug("Mediacast error " + response + ":" + message + " from url " + url);
                 throw new MediacastException(BAD_RESPONSE, "weblogEdit.mediaCastResponseError");
             } else {
                 String contentType = con.getContentType();
                 long length = con.getContentLength();
                 
                 if(contentType == null || length == -1) {
-                    log.debug("Response valid, but contentType or length is invalid");
+                    LOG.debug("Response valid, but contentType or length is invalid");
                     throw new MediacastException(INCOMPLETE, "weblogEdit.mediaCastLacksContentTypeOrLength");
                 }
                 
                 resource = new MediacastResource(url, contentType, length);
-                log.debug("Valid mediacast resource = "+resource.toString());
+                LOG.debug("Valid mediacast resource = " + resource.toString());
                 
             }
         } catch (MalformedURLException mfue) {
-            log.debug("Malformed MediaCast url: " + url);
+            LOG.debug("Malformed MediaCast url: " + url);
             throw new MediacastException(BAD_URL, "weblogEdit.mediaCastUrlMalformed", mfue);
         } catch (Exception e) {
-            log.error("ERROR while checking MediaCast URL: " + url + ": " + e.getMessage());
+            LOG.error("ERROR while checking MediaCast URL: " + url + ": " + e.getMessage());
             throw new MediacastException(CHECK_FAILED, "weblogEdit.mediaCastFailedFetchingInfo", e);
         }      
         return resource;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Trackback.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Trackback.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Trackback.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Trackback.java Sun Nov 17 11:22:34 2013
@@ -48,7 +48,7 @@ import org.jdom.input.SAXBuilder;
  */
 public class Trackback {
     
-    private static final Log log = LogFactory.getLog(Trackback.class);
+    private static final Log LOG = LogFactory.getLog(Trackback.class);
     
     private final WeblogEntry entry;
     private final String trackbackURL;
@@ -100,7 +100,7 @@ public class Trackback {
         
         RollerMessages messages = new RollerMessages();
         
-        log.debug("Sending trackback to url - "+trackbackURL);
+        LOG.debug("Sending trackback to url - " + trackbackURL);
         
         // Construct data
         String title = entry.getTitle();
@@ -116,7 +116,7 @@ public class Trackback {
         params.put("blog_name", URLUtilities.encode(blog_name));
         String queryString = URLUtilities.getQueryString(params);
         
-        log.debug("query string - "+queryString);
+        LOG.debug("query string - " + queryString);
         
         // prepare http request
         HttpClient client = new HttpClient();
@@ -132,8 +132,8 @@ public class Trackback {
             byte[] response = method.getResponseBody();
             String responseString = Utilities.escapeHTML(new String(response, "UTF-8"));
             
-            log.debug("result = "+statusCode+" "+method.getStatusText());
-            log.debug("response:\n"+responseString);
+            LOG.debug("result = " + statusCode + " " + method.getStatusText());
+            LOG.debug("response:\n" + responseString);
             
             if(statusCode == HttpStatus.SC_OK) {
                 // trackback request succeeded, message will give details
@@ -155,7 +155,7 @@ public class Trackback {
             
         } catch (IOException e) {
             // some kind of transport error sending trackback post
-            log.debug("Error sending trackback", e);
+            LOG.debug("Error sending trackback", e);
             messages.addError("weblogEdit.trackbackErrorTransport");
         } finally {
             // release used connection

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/WSSEUtilities.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/WSSEUtilities.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/WSSEUtilities.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/WSSEUtilities.java Sun Nov 17 11:22:34 2013
@@ -39,7 +39,7 @@ public class WSSEUtilities {
             digester.update(created);
             digester.update(password);
             byte[] digest = digester.digest();
-            result = new String(base64Encode(digest));
+            result = base64Encode(digest);
         }
         catch (NoSuchAlgorithmException e) {
             result = null;
@@ -56,7 +56,7 @@ public class WSSEUtilities {
     throws UnsupportedEncodingException {  
        
         byte[] nonceBytes = Long.toString(new Date().getTime()).getBytes();
-        String nonce = new String(WSSEUtilities.base64Encode(nonceBytes));
+        String nonce = WSSEUtilities.base64Encode(nonceBytes);
         
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
         String created = sdf.format(new Date());
@@ -64,7 +64,7 @@ public class WSSEUtilities {
         String digest = WSSEUtilities.generateDigest(
                 nonceBytes, created.getBytes("UTF-8"), password.getBytes("UTF-8"));
         
-        StringBuffer header = new StringBuffer("UsernameToken Username=\"");
+        StringBuilder header = new StringBuilder("UsernameToken Username=\"");
         header.append(userName);
         header.append("\", ");
         header.append("PasswordDigest=\"");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Handler.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Handler.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Handler.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Handler.java Sun Nov 17 11:22:34 2013
@@ -20,8 +20,6 @@ package org.apache.roller.weblogger.webs
 import java.io.IOException;
 import java.io.Reader;
 import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.config.WebloggerConfig;
 import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.WebloggerFactory;
@@ -45,7 +43,13 @@ import org.jdom.input.SAXBuilder;
  */
 abstract class Handler {
     protected static final String ENDPOINT = "/rap";
-    
+
+    private HttpServletRequest request;
+    private Weblogger roller;
+    private String userName;
+    private URI uri;
+    private String urlPrefix;
+
     static class URI {
         private static Pattern PATHINFO_PATTERN = Pattern.compile("^/(users|weblogs|members)(?:/(.*))?$");
         
@@ -89,15 +93,7 @@ abstract class Handler {
             return getEntryId() != null && type != null;
         }
     }
-    
-    protected static final Log logger = LogFactory.getFactory().getInstance(Handler.class);
-    
-    private HttpServletRequest request;
-    private Weblogger roller;
-    private String userName;
-    private URI uri;
-    private String urlPrefix;
-    
+
     /** Get a Handler object implementation based on the given request. */
     public static Handler getHandler(HttpServletRequest req) throws HandlerException {
         boolean enabled = WebloggerConfig.getBooleanProperty("webservices.adminprotocol.enabled");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/RollerMemberHandler.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/RollerMemberHandler.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/RollerMemberHandler.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/RollerMemberHandler.java Sun Nov 17 11:22:34 2013
@@ -281,9 +281,13 @@ class RollerMemberHandler extends Handle
     
     private List<String> toActionList(String perm) throws HandlerException {
         List<String> actions = new ArrayList<String>();
-        if ("ADMIN".equals(perm))       actions.add(WeblogPermission.ADMIN);
-        else if ("AUTHOR".equals(perm)) actions.add(WeblogPermission.POST);
-        else                            actions.add(WeblogPermission.EDIT_DRAFT);
+        if ("ADMIN".equals(perm)) {
+            actions.add(WeblogPermission.ADMIN);
+        } else if ("AUTHOR".equals(perm)) {
+            actions.add(WeblogPermission.POST);
+        } else {
+            actions.add(WeblogPermission.EDIT_DRAFT);
+        }
         return actions;       
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AccessTokenServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AccessTokenServlet.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AccessTokenServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AccessTokenServlet.java Sun Nov 17 11:22:34 2013
@@ -47,12 +47,6 @@ public class AccessTokenServlet extends 
             LogFactory.getFactory().getInstance(AccessTokenServlet.class);
     
     @Override
-    public void init(ServletConfig config) throws ServletException {
-        super.init(config);
-        // nothing at this point
-    }
-    
-    @Override
     public void doGet(HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
         processRequest(request, response);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AuthorizationServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AuthorizationServlet.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AuthorizationServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/AuthorizationServlet.java Sun Nov 17 11:22:34 2013
@@ -46,12 +46,6 @@ public class AuthorizationServlet extend
             LogFactory.getFactory().getInstance(AuthorizationServlet.class);
     
     @Override
-    public void init(ServletConfig config) throws ServletException {
-        super.init(config);
-        // nothing at this point
-    }
-    
-    @Override
     public void doGet(HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
         

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/RequestTokenServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/RequestTokenServlet.java?rev=1542706&r1=1542705&r2=1542706&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/RequestTokenServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/oauth/RequestTokenServlet.java Sun Nov 17 11:22:34 2013
@@ -48,11 +48,6 @@ public class RequestTokenServlet extends
             LogFactory.getFactory().getInstance(RequestTokenServlet.class);
     
     @Override
-    public void init(ServletConfig config) throws ServletException {
-        super.init(config);
-    }
-    
-    @Override
     public void doGet(HttpServletRequest request, HttpServletResponse response) 
             throws IOException, ServletException {
         processRequest(request, response);



Mime
View raw message