roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1520777 [1/2] - in /roller/trunk/app/src/main: java/org/apache/roller/planet/pojos/ java/org/apache/roller/planet/tasks/ java/org/apache/roller/util/ java/org/apache/roller/weblogger/business/ java/org/apache/roller/weblogger/business/jpa/...
Date Sat, 07 Sep 2013 14:25:19 GMT
Author: gmazza
Date: Sat Sep  7 14:25:18 2013
New Revision: 1520777

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

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/tasks/GeneratePlanetTask.java
    roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.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/themes/SharedThemeTemplateCode.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/PingConfig.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/WebloggerRuntimeConfig.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileTag.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthAccessorRecord.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthConsumerRecord.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingQueueEntry.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingTarget.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/RuntimeConfigProperty.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StatCount.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/User.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserAttribute.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserRole.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmarkFolder.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryAttribute.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryComment.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryTag.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogHitCount.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeAssoc.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CharEncodingFilter.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesListPager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet.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/editor/EntriesBean.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryAdd.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MembersInvite.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/tagdata/TagDataServlet.java
    roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/TaskLock.orm.xml

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java Sat Sep  7 14:25:18 2013
@@ -200,11 +200,15 @@ public class PlanetGroup implements Seri
      */
     public boolean qualified(SubscriptionEntry entry) {
         String[] cats = createCategoryRestrictionAsArray();
-        if (cats == null || cats.length == 0) return true;
+        if (cats == null || cats.length == 0) {
+            return true;
+        }
         for (int i=0; i<cats.length; i++) {
-            if (entry.inCategory(cats[i])) return true;
+            if (entry.inCategory(cats[i])) {
+                return true;
+            }
         }
-        return  false;
+        return false;
     }
     
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/Subscription.java Sat Sep  7 14:25:18 2013
@@ -60,7 +60,7 @@ public class Subscription implements Ser
     }
     
     /**
-     * Determines if subscriotions are equal by comparing feed URLs.
+     * Determines if subscriptions are equal by comparing feed URLs.
      */
     public boolean equals(Object other) {        
         if(this == other) return true;
@@ -74,7 +74,7 @@ public class Subscription implements Ser
     }
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         
         buf.append("{");
         buf.append(getFeedURL()).append(", ");

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/tasks/GeneratePlanetTask.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/tasks/GeneratePlanetTask.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/tasks/GeneratePlanetTask.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/tasks/GeneratePlanetTask.java Sat Sep  7 14:25:18 2013
@@ -52,7 +52,7 @@ public class GeneratePlanetTask extends 
     public void run() {
         try {            
             Weblogger weblogger = WebloggerFactory.getWeblogger();
-            PlanetManager planetManager = weblogger.getPlanetManager();
+//          PlanetManager planetManager = weblogger.getPlanetManager();
                         
             // Ignore values from database
             //String mainPage = planetManager.getConfiguration().getMainPage();
@@ -90,7 +90,9 @@ public class GeneratePlanetTask extends 
             
             // Ensure that output directories exists, one for each group
             File outputDirObj = new File(outputDir);
-            if (!outputDirObj.exists()) outputDirObj.mkdirs();
+            if (!outputDirObj.exists()) {
+                outputDirObj.mkdirs();
+            }
             
             List groups = Collections.EMPTY_LIST;
             // groups must be part of a planet now, so getGroupHandles() was removed
@@ -99,7 +101,9 @@ public class GeneratePlanetTask extends 
                 String groupHandle = (String) it.next();
                 String groupDirName = outputDirObj + File.separator + groupHandle;
                 File groupDir = new File(groupDirName);
-                if (!groupDir.exists()) groupDir.mkdirs();
+                if (!groupDir.exists()) {
+                    groupDir.mkdirs();
+                }
             }
             
             // Generate files: execute control template

Modified: roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java Sat Sep  7 14:25:18 2013
@@ -58,7 +58,9 @@ public final class PropertyExpander {
      */
     public static String expandProperties(String input, Map props) {
         
-        if (input == null) return null;
+        if (input == null) {
+            return null;
+        }
         
         Matcher matcher = EXPANSION_PATTERN.matcher(input);
         
@@ -67,7 +69,9 @@ public final class PropertyExpander {
             String propName = matcher.group(2);
             String value = (String) props.get(propName);
             // if no value is found, use a value equal to the original expression
-            if (value == null) value = matcher.group(0);
+            if (value == null) {
+                value = matcher.group(0);
+            }
             // Fake a literal replacement since Matcher.quoteReplacement() is not present in 1.4.
             matcher.appendReplacement(expanded, "");
             expanded.append(value);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/DatabaseProvider.java Sat Sep  7 14:25:18 2013
@@ -114,8 +114,12 @@ public class DatabaseProvider  {
             
             if (getJdbcUsername() != null || getJdbcPassword() != null) {
                 props = new Properties();
-                if (getJdbcUsername() != null) props.put("user", getJdbcUsername());
-                if (getJdbcPassword() != null) props.put("password", getJdbcPassword());
+                if (getJdbcUsername() != null) {
+                    props.put("user", getJdbcUsername());
+                }
+                if (getJdbcPassword() != null) {
+                    props.put("password", getJdbcPassword());
+                }
             }
             
         // Else attempt to locate JNDI datasource

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java Sat Sep  7 14:25:18 2013
@@ -189,8 +189,12 @@ public class MultiWeblogURLStrategy exte
         } else if(tags != null && tags.size() > 0) {
             pathinfo.append("tags/").append(URLUtilities.getEncodedTagsString(tags));
         } else {
-            if(dateString != null) params.put("date", dateString);
-            if(cat != null) params.put("cat", URLUtilities.encode(cat));
+            if(dateString != null) {
+                params.put("date", dateString);
+            }
+            if(cat != null) {
+                params.put("cat", URLUtilities.encode(cat));
+            }
         }
 
         if(pageNum > 0) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java Sat Sep  7 14:25:18 2013
@@ -33,7 +33,7 @@ import org.apache.roller.weblogger.util.
 public class PreviewURLStrategy extends MultiWeblogURLStrategy {
     
     private final String previewTheme;
-    
+    private static final String PREVIEW_URL_SEGMENT = "/roller-ui/authoring/preview/";
     
     public PreviewURLStrategy(String theme) {
         previewTheme = theme;
@@ -59,7 +59,7 @@ public class PreviewURLStrategy extends 
             url.append(WebloggerRuntimeConfig.getRelativeContextURL());
         }
         
-        url.append("/roller-ui/authoring/preview/").append(weblog.getHandle()).append("/");
+        url.append(PREVIEW_URL_SEGMENT).append(weblog.getHandle()).append("/");
         
         if(locale != null) {
             url.append(locale).append("/");
@@ -96,7 +96,7 @@ public class PreviewURLStrategy extends 
             url.append(WebloggerRuntimeConfig.getRelativeContextURL());
         }
         
-        url.append("/roller-ui/authoring/preview/").append(weblog.getHandle()).append("/");
+        url.append(PREVIEW_URL_SEGMENT).append(weblog.getHandle()).append("/");
         
         if(locale != null) {
             url.append(locale).append("/");
@@ -138,7 +138,7 @@ public class PreviewURLStrategy extends 
         	pathinfo.append(WebloggerRuntimeConfig.getRelativeContextURL());
         }
         
-        pathinfo.append("/roller-ui/authoring/preview/").append(weblog.getHandle()).append("/");
+        pathinfo.append(PREVIEW_URL_SEGMENT).append(weblog.getHandle()).append("/");
         
         if(locale != null) {
         	pathinfo.append(locale).append("/");
@@ -160,8 +160,12 @@ public class PreviewURLStrategy extends 
         } else if(tags != null && tags.size() > 0) {
             pathinfo.append("tags/").append(URLUtilities.getEncodedTagsString(tags));
         } else {
-            if(dateString != null) params.put("date", dateString);
-            if(cat != null) params.put("cat", URLUtilities.encode(cat));
+            if (dateString != null) {
+                params.put("date", dateString);
+            }
+            if (cat != null) {
+                params.put("cat", URLUtilities.encode(cat));
+            }
         }
 
         if(pageNum > 0) {
@@ -203,7 +207,7 @@ public class PreviewURLStrategy extends 
             pathinfo.append(WebloggerRuntimeConfig.getRelativeContextURL());
         }
         
-        pathinfo.append("/roller-ui/authoring/preview/").append(weblog.getHandle()).append("/");
+        pathinfo.append(PREVIEW_URL_SEGMENT).append(weblog.getHandle()).append("/");
         
         if(locale != null) {
             pathinfo.append(locale).append("/");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java Sat Sep  7 14:25:18 2013
@@ -51,7 +51,6 @@ public class JPAPropertiesManagerImpl im
     private static Log log = LogFactory.getLog(
         JPAPropertiesManagerImpl.class);
 
-    private final Weblogger roller;
     private final JPAPersistenceStrategy strategy;
     
     
@@ -61,7 +60,6 @@ public class JPAPropertiesManagerImpl im
     @com.google.inject.Inject
     protected JPAPropertiesManagerImpl(Weblogger roller, JPAPersistenceStrategy strategy) {
         log.debug("Instantiating JPA Properties Manager");
-        this.roller = roller;
         this.strategy = strategy;
     }
     
@@ -74,14 +72,7 @@ public class JPAPropertiesManagerImpl im
         Map props = null;
         try {
             props = this.getProperties();
-
-            if(props.size() < 1) {
-                // empty props table ... load defaults
-                props = initializeMissingProps(props);
-            } else {
-                // found existing props ... check for new props
-                props = initializeMissingProps(props);
-            }
+            initializeMissingProps(props);
 
             // save our changes
             this.saveProperties(props);
@@ -162,16 +153,18 @@ public class JPAPropertiesManagerImpl im
      **/
     private Map initializeMissingProps(Map props) {
 
-        if(props == null)
+        if(props == null) {
             props = new HashMap();
+        }
 
         // start by getting our runtimeConfigDefs
         RuntimeConfigDefs runtimeConfigDefs =
                 WebloggerRuntimeConfig.getRuntimeConfigDefs();
 
         // can't do initialization without our config defs
-        if(runtimeConfigDefs == null)
+        if(runtimeConfigDefs == null) {
             return props;
+        }
 
         // iterator through all the definitions and add properties
         // that are not already in our props map

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.java Sat Sep  7 14:25:18 2013
@@ -103,7 +103,7 @@ public class JPAThreadManagerImpl extend
                 if(LOG.isDebugEnabled()) {
                     LOG.debug("last run = "+taskLock.getLastRun());
                     LOG.debug("new run time = "+runTime);
-                    LOG.debug("last acquired = "+taskLock.getTimeAquired());
+                    LOG.debug("last acquired = "+taskLock.getTimeAcquired());
                     LOG.debug("time leased = "+taskLock.getTimeLeased());
                     LOG.debug("lease expiration = "+leaseExpiration);
                 }
@@ -114,7 +114,7 @@ public class JPAThreadManagerImpl extend
                 q.setParameter(2, Integer.valueOf(task.getLeaseTime()));
                 q.setParameter(3, new Timestamp(runTime.getTime()));
                 q.setParameter(4, task.getName());
-                q.setParameter(5, taskLock.getTimeAquired());
+                q.setParameter(5, taskLock.getTimeAcquired());
                 q.setParameter(6, new Timestamp(leaseExpiration.getTime()));
                 int result = q.executeUpdate();
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java Sat Sep  7 14:25:18 2013
@@ -45,23 +45,23 @@ public class ConvertLineBreaksPlugin imp
     
     private static Log mLogger = LogFactory.getLog(ConvertLineBreaksPlugin.class);
     
-    private static final String name = "Convert Line Breaks";
-    private static final String description = "Convert plain text paragraphs to html by adding p and br tags";
-    private static final String version = "0.1";
+    private static final String NAME = "Convert Line Breaks";
+    private static final String DESCRIPTION = "Convert plain text paragraphs to html by adding p and br tags";
+    private static final String VERSION = "0.1";
     
     
     public ConvertLineBreaksPlugin() {
-        mLogger.debug("Instantiating ConvertLineBreaksPlugin v"+this.version);
+        mLogger.debug("Instantiating ConvertLineBreaksPlugin v"+this.VERSION);
     }
     
     
     public String getName() {
-        return name;
+        return NAME;
     }
     
     
     public String getDescription() {
-        return description;
+        return DESCRIPTION;
     }
     
     
@@ -77,8 +77,9 @@ public class ConvertLineBreaksPlugin imp
      */
     public String render(WeblogEntry entry, String str) {
         
-        if(str == null || str.trim().equals(""))
+        if(str == null || str.trim().equals("")) {
             return "";
+        }
         
         mLogger.debug("Rendering string of length "+str.length());
         

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=1520777&r1=1520776&r2=1520777&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 Sat Sep  7 14:25:18 2013
@@ -82,7 +82,7 @@ public abstract class ThreadManagerImpl 
                         taskLock = new TaskLock();
                         taskLock.setName(task.getName());
                         taskLock.setLastRun(new Date(0));
-                        taskLock.setTimeAquired(new Date(0));
+                        taskLock.setTimeAcquired(new Date(0));
                         taskLock.setTimeLeased(0);
 
                         // save it

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java Sat Sep  7 14:25:18 2013
@@ -32,7 +32,7 @@ public class SharedThemeTemplateCode imp
 	private String templateId = null;
 	private String template = null;
 	private String type = null;
-	private String ContentType = null;
+	private String contentType = null;
 	private String templateLanguage = null;
 	private Date lastModified = null;
 
@@ -96,7 +96,7 @@ public class SharedThemeTemplateCode imp
 	// ------------------------------------------------------- Good citizenship
 
 	public String toString() {
-		StringBuffer buf = new StringBuffer();
+		StringBuilder buf = new StringBuilder();
 		buf.append("{");
 		buf.append(this.templateId);
 		buf.append(", [ ").append(this.template);
@@ -106,10 +106,12 @@ public class SharedThemeTemplateCode imp
 	}
 
 	public boolean equals(Object other) {
-		if (other == this)
-			return true;
-		if (other instanceof SharedThemeTemplateCode != true)
-			return false;
+		if (other == this) {
+            return true;
+        }
+		if (!(other instanceof SharedThemeTemplateCode)) {
+            return false;
+        }
 		SharedThemeTemplateCode o = (SharedThemeTemplateCode) other;
 		return new EqualsBuilder().append(templateId, o.getTemplateId())
 				.append(template, o.getTemplate()).isEquals();
@@ -132,11 +134,11 @@ public class SharedThemeTemplateCode imp
 
 	// @Override
 	public String getContentType() {
-		return ContentType;
+		return contentType;
 	}
 
 	// @Override
 	public void setContentType(String contentType) {
-		ContentType = contentType;
+		this.contentType = contentType;
 	}
 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/PingConfig.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/PingConfig.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/PingConfig.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/PingConfig.java Sat Sep  7 14:25:18 2013
@@ -41,10 +41,10 @@ import java.util.regex.Pattern;
  * @author <a href="mailto:anil@busybuddha.org">Anil Gangolli</a>
  */
 public class PingConfig {
-    private static final Log logger = LogFactory.getLog(PingConfig.class);
+    private static final Log LOGGER = LogFactory.getLog(PingConfig.class);
 
 
-    // Config property for maximim ping attempts.
+    // Config property for maximum ping attempts.
     static final String MAX_PING_ATTEMPTS_PROP = "pings.maxPingAttempts";
     private static final int MAX_PING_ATTEMPTS_DEFAULT = 3;
     private static final int MAX_PING_ATTEMPTS_MIN = 1;
@@ -98,7 +98,7 @@ public class PingConfig {
     // This was introduced in order to support certain buggy (but popular) ping
     // targets that implement minor variants of the WeblogUpdates.ping call.
     // This is initialized once at startup, and referenced when pings are made.
-    private static final Map configuredVariants = new HashMap();
+    private static final Map CONFIGURED_VARIANTS = new HashMap();
     
     // Pattern used to parse common ping targets as well as ping variants.
     // Each initial commmon ping target is specified in the format {{name}{url}}
@@ -186,15 +186,15 @@ public class PingConfig {
     public static void initializeCommonTargets() throws WebloggerException {
         String configuredVal = WebloggerConfig.getProperty(PINGS_INITIAL_COMMON_TARGETS_PROP);
         if (configuredVal == null || configuredVal.trim().length() == 0) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("No (or empty) value of " + PINGS_INITIAL_COMMON_TARGETS_PROP + " present in the configuration.  Skipping initialization of commmon targets.");
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("No (or empty) value of " + PINGS_INITIAL_COMMON_TARGETS_PROP + " present in the configuration.  Skipping initialization of commmon targets.");
             }
             return;
         }
         PingTargetManager pingTargetMgr = WebloggerFactory.getWeblogger().getPingTargetManager();
         if (!pingTargetMgr.getCommonPingTargets().isEmpty()) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("Some common ping targets are present in the database already.  Skipping initialization.");
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("Some common ping targets are present in the database already.  Skipping initialization.");
             }
             return;
         }
@@ -204,17 +204,19 @@ public class PingConfig {
             // Trim space around the target spec
             String thisTarget = configuredTargets[i].trim();
             // skip empty ones
-            if (thisTarget.length() == 0) continue;
+            if (thisTarget.length() == 0) {
+                continue;
+            }
             // parse the ith target and store it
             Matcher m = NESTED_BRACE_PAIR.matcher(thisTarget);
             if (m.matches() && m.groupCount() == 2) {
                 String name = m.group(1).trim();
                 String url = m.group(2).trim();
-                logger.info("Creating common ping target '" + name + "' from configuration properties.");
+                LOGGER.info("Creating common ping target '" + name + "' from configuration properties.");
                 PingTarget pingTarget = new PingTarget(null, name, url, null, false);
                 pingTargetMgr.savePingTarget(pingTarget);
             } else {
-                logger.error("Unable to parse configured initial ping target '" + thisTarget + "'. Skipping this target. Check your setting of the property " + PINGS_INITIAL_COMMON_TARGETS_PROP);
+                LOGGER.error("Unable to parse configured initial ping target '" + thisTarget + "'. Skipping this target. Check your setting of the property " + PINGS_INITIAL_COMMON_TARGETS_PROP);
             }
         }
     }
@@ -225,15 +227,17 @@ public class PingConfig {
     public static void initializePingVariants() {
         String configuredVal = WebloggerConfig.getProperty(PINGS_VARIANT_OPTIONS_PROP);
         if (configuredVal == null || configuredVal.trim().length() == 0) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("No (or empty) value of " + PINGS_VARIANT_OPTIONS_PROP + " present in the configuration.  Skipping initialization of ping variants.");
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("No (or empty) value of " + PINGS_VARIANT_OPTIONS_PROP + " present in the configuration.  Skipping initialization of ping variants.");
             }
             return;
         }
         String[] variants = configuredVal.trim().split(",");
         for (int i = 0; i < variants.length; i++) {
             String thisVariant = variants[i].trim();
-            if (thisVariant.length() == 0) continue;
+            if (thisVariant.length() == 0) {
+                continue;
+            }
             Matcher m = NESTED_BRACE_PAIR.matcher(thisVariant);
             if (m.matches() && m.groupCount() == 2) {
                 String url = m.group(1).trim();
@@ -247,12 +251,12 @@ public class PingConfig {
                     }
                 }
                 if (!variantOptions.isEmpty()) {
-                    configuredVariants.put(url, variantOptions);
+                    CONFIGURED_VARIANTS.put(url, variantOptions);
                 } else {
-                    logger.warn("Ping variant entry for url '" + url + "' has an empty variant options list.  Ignored.");
+                    LOGGER.warn("Ping variant entry for url '" + url + "' has an empty variant options list.  Ignored.");
                 }
             } else {
-                logger.error("Unable to parse configured ping variant '" + thisVariant + "'. Skipping this variant. Check your setting of the property " + PINGS_VARIANT_OPTIONS_PROP);
+                LOGGER.error("Unable to parse configured ping variant '" + thisVariant + "'. Skipping this variant. Check your setting of the property " + PINGS_VARIANT_OPTIONS_PROP);
             }
         }
     }
@@ -265,7 +269,7 @@ public class PingConfig {
      *         the empty set if there are no variants configured.
      */
     public static Set getVariantOptions(String pingTargetUrl) {
-        Set variantOptions = (Set) configuredVariants.get(pingTargetUrl);
+        Set variantOptions = (Set) CONFIGURED_VARIANTS.get(pingTargetUrl);
         if (variantOptions == null) {
             variantOptions = Collections.EMPTY_SET;
         }
@@ -288,8 +292,8 @@ public class PingConfig {
     private static int getIntegerProperty(String propName, int defaultValue, int min, int max) {
         String configuredVal = WebloggerConfig.getProperty(propName);
         if (configuredVal == null) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("PingConfig property '" + propName + "' is not present in the configuration.  Using default value: " + defaultValue);
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("PingConfig property '" + propName + "' is not present in the configuration.  Using default value: " + defaultValue);
             }
             return defaultValue;
         }
@@ -298,12 +302,12 @@ public class PingConfig {
         try {
             val = Integer.parseInt(configuredVal);
         } catch (NumberFormatException ex) {
-            logger.error("ERROR: PingConfig property '" + propName + "' is not an integer value.  Using default value: " + defaultValue);
+            LOGGER.error("ERROR: PingConfig property '" + propName + "' is not an integer value.  Using default value: " + defaultValue);
             return defaultValue;
         }
 
         if (val < min || val > max) {
-            logger.error("ERROR: PingConfig property '" + propName + "' is outside the required range (" + min + ", " + max + ").  Using default value: " + defaultValue);
+            LOGGER.error("ERROR: PingConfig property '" + propName + "' is outside the required range (" + min + ", " + max + ").  Using default value: " + defaultValue);
             return defaultValue;
         }
 
@@ -320,8 +324,8 @@ public class PingConfig {
     private static boolean getBooleanProperty(String propName, boolean defaultValue) {
         String configuredVal = WebloggerConfig.getProperty(propName);
         if (configuredVal == null) {
-            if (logger.isDebugEnabled()) {
-                logger.debug("PingConfig property '" + propName + "' is not present in the configuration.  Using default value: " + defaultValue);
+            if (LOGGER.isDebugEnabled()) {
+                LOGGER.debug("PingConfig property '" + propName + "' is not present in the configuration.  Using default value: " + defaultValue);
             }
             return defaultValue;
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/WebloggerRuntimeConfig.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/WebloggerRuntimeConfig.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/WebloggerRuntimeConfig.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/config/WebloggerRuntimeConfig.java Sat Sep  7 14:25:18 2013
@@ -38,11 +38,11 @@ import org.apache.roller.weblogger.pojos
  * 
  * We also provide some methods for converting to different data types.
  */
-public class WebloggerRuntimeConfig {
+public final class WebloggerRuntimeConfig {
     
     private static Log log = LogFactory.getLog(WebloggerRuntimeConfig.class);
     
-    private static String runtime_config = "/org/apache/roller/weblogger/config/runtimeConfigDefs.xml";
+    private static String RUNTIME_CONFIG = "/org/apache/roller/weblogger/config/runtimeConfigDefs.xml";
     private static RuntimeConfigDefs configDefs = null;
     
     // special case for our context urls
@@ -86,10 +86,11 @@ public class WebloggerRuntimeConfig {
         // get the value first, then convert
         String value = WebloggerRuntimeConfig.getProperty(name);
         
-        if(value == null)
+        if (value == null) {
             return false;
-        
-        return (new Boolean(value)).booleanValue();
+        }
+
+        return Boolean.valueOf(value);
     }
     
     
@@ -101,8 +102,9 @@ public class WebloggerRuntimeConfig {
         // get the value first, then convert
         String value = WebloggerRuntimeConfig.getProperty(name);
         
-        if(value == null)
+        if (value == null) {
             return -1;
+        }
         
         int intval = -1;
         try {
@@ -122,7 +124,7 @@ public class WebloggerRuntimeConfig {
             // unmarshall the config defs file
             try {
                 InputStream is = 
-                        WebloggerRuntimeConfig.class.getResourceAsStream(runtime_config);
+                        WebloggerRuntimeConfig.class.getResourceAsStream(RUNTIME_CONFIG);
                 
                 RuntimeConfigDefsParser parser = new RuntimeConfigDefsParser();
                 configDefs = parser.unmarshall(is);
@@ -152,13 +154,14 @@ public class WebloggerRuntimeConfig {
         
         try {
             InputStreamReader reader =
-                    new InputStreamReader(WebloggerConfig.class.getResourceAsStream(runtime_config));
+                    new InputStreamReader(WebloggerConfig.class.getResourceAsStream(RUNTIME_CONFIG));
             StringWriter configString = new StringWriter();
             
             char[] buf = new char[8196];
             int length = 0;
-            while((length = reader.read(buf)) > 0)
+            while((length = reader.read(buf)) > 0) {
                 configString.write(buf, 0, length);
+            }
             
             reader.close();
             

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java Sat Sep  7 14:25:18 2013
@@ -64,11 +64,13 @@ public class PlanetGroups extends Planet
     @Override
     public void myPrepare() {
         
-        if(getPlanet() != null && getBean().getId() != null) try {
-            PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
-            setGroup(pmgr.getGroupById(getBean().getId()));
-        } catch(Exception ex) {
-            log.error("Error looking up planet group - "+getBean().getId(), ex);
+        if(getPlanet() != null && getBean().getId() != null) {
+            try {
+                PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
+                setGroup(pmgr.getGroupById(getBean().getId()));
+            } catch(Exception ex) {
+                log.error("Error looking up planet group - " + getBean().getId(), ex);
+            }
         }
     }
 
@@ -94,31 +96,32 @@ public class PlanetGroups extends Planet
         
         myValidate();
         
-        if (!hasActionErrors()) try {
-            
-            PlanetGroup group = getGroup();
-            if(group == null) {
-                log.debug("Adding New Group");
-                group = new PlanetGroup();
-                group.setPlanet(getPlanet());
-            } else {
-                log.debug("Updating Existing Group");
+        if (!hasActionErrors()) {
+            try {
+                PlanetGroup group = getGroup();
+                if(group == null) {
+                    log.debug("Adding New Group");
+                    group = new PlanetGroup();
+                    group.setPlanet(getPlanet());
+                } else {
+                    log.debug("Updating Existing Group");
+                }
+
+                // copy in submitted data
+                getBean().copyTo(group);
+
+                // save and flush
+                PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
+                pmgr.saveGroup(group);
+                WebloggerFactory.getWeblogger().flush();
+
+                addMessage("planetGroups.success.saved");
+
+            } catch(Exception ex) {
+                log.error("Error saving planet group - "+getBean().getId(), ex);
+                // TODO: i18n
+                addError("Error saving planet group");
             }
-            
-            // copy in submitted data
-            getBean().copyTo(group);
-            
-            // save and flush
-            PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
-            pmgr.saveGroup(group);
-            WebloggerFactory.getWeblogger().flush();
-            
-            addMessage("planetGroups.success.saved");
-            
-        } catch(Exception ex) {
-            log.error("Error saving planet group - "+getBean().getId(), ex);
-            // TODO: i18n
-            addError("Error saving planet group");
         }
         
         return LIST;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java Sat Sep  7 14:25:18 2013
@@ -37,7 +37,7 @@ import org.apache.roller.weblogger.pojos
  */
 public class PlanetSubscriptions extends PlanetUIAction {
     
-    private static final Log log = LogFactory.getLog(PlanetSubscriptions.class);
+    private static final Log LOGGER = LogFactory.getLog(PlanetSubscriptions.class);
     
     // id of the group we are working in
     private String groupHandle = null;
@@ -80,7 +80,7 @@ public class PlanetSubscriptions extends
         try {
             setGroup(pmgr.getGroup(getPlanet(), getGroupHandle()));
         } catch (RollerException ex) {
-            log.error("Error looking up planet group - "+getGroupHandle(), ex);
+            LOGGER.error("Error looking up planet group - " + getGroupHandle(), ex);
         }
     }
     
@@ -100,43 +100,45 @@ public class PlanetSubscriptions extends
         
         myValidate();
         
-        if(!hasActionErrors()) try {
-            PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
-            
-            // check if this subscription already exists before adding it
-            Subscription sub = pmgr.getSubscription(getSubUrl());
-            if(sub == null) {
-                log.debug("Adding New Subscription - "+getSubUrl());
-                
-                // sub doesn't exist yet, so we need to fetch it
-                FeedFetcher fetcher = WebloggerFactory.getWeblogger().getFeedFetcher();
-                sub = fetcher.fetchSubscription(getSubUrl());
-                
-                // save new sub
-                pmgr.saveSubscription(sub);
-            } else {
-                log.debug("Adding Existing Subscription - "+getSubUrl());
-                
-                // Subscription already exists
-                addMessage("planetSubscription.foundExisting", sub.getTitle());
+        if(!hasActionErrors()) {
+            try {
+                PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
+
+                // check if this subscription already exists before adding it
+                Subscription sub = pmgr.getSubscription(getSubUrl());
+                if(sub == null) {
+                    LOGGER.debug("Adding New Subscription - " + getSubUrl());
+
+                    // sub doesn't exist yet, so we need to fetch it
+                    FeedFetcher fetcher = WebloggerFactory.getWeblogger().getFeedFetcher();
+                    sub = fetcher.fetchSubscription(getSubUrl());
+
+                    // save new sub
+                    pmgr.saveSubscription(sub);
+                } else {
+                    LOGGER.debug("Adding Existing Subscription - " + getSubUrl());
+
+                    // Subscription already exists
+                    addMessage("planetSubscription.foundExisting", sub.getTitle());
+                }
+
+                // add the sub to the group
+                group.getSubscriptions().add(sub);
+                sub.getGroups().add(group);
+                pmgr.saveGroup(group);
+
+                // flush changes
+                WebloggerFactory.getWeblogger().flush();
+
+                // clear field after success
+                setSubUrl(null);
+
+                addMessage("planetSubscription.success.saved");
+
+            } catch (RollerException ex) {
+                LOGGER.error("Unexpected error saving subscription", ex);
+                addError("planetSubscriptions.error.duringSave", ex.getRootCauseMessage());
             }
-            
-            // add the sub to the group
-            group.getSubscriptions().add(sub);
-            sub.getGroups().add(group);
-            pmgr.saveGroup(group);
-            
-            // flush changes
-            WebloggerFactory.getWeblogger().flush();
-            
-            // clear field after success
-            setSubUrl(null);
-            
-            addMessage("planetSubscription.success.saved");
-            
-        } catch (RollerException ex) {
-            log.error("Unexpected error saving subscription", ex);
-            addError("planetSubscriptions.error.duringSave", ex.getRootCauseMessage());
         }
         
         return LIST;
@@ -148,25 +150,27 @@ public class PlanetSubscriptions extends
      */
     public String delete() {
         
-        if(getSubUrl() != null) try {
-            
-            PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
-            
-            // remove subscription
-            Subscription sub = pmgr.getSubscription(getSubUrl());
-            getGroup().getSubscriptions().remove(sub);
-            sub.getGroups().remove(getGroup());
-            pmgr.saveGroup(getGroup());
-            WebloggerFactory.getWeblogger().flush();
-            
-            // clear field after success
-            setSubUrl(null);
-            
-            addMessage("planetSubscription.success.deleted");
-            
-        } catch (RollerException ex) {
-            log.error("Error removing planet subscription", ex);
-            addError("planetSubscription.error.deleting");
+        if(getSubUrl() != null) {
+            try {
+
+                PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
+
+                // remove subscription
+                Subscription sub = pmgr.getSubscription(getSubUrl());
+                getGroup().getSubscriptions().remove(sub);
+                sub.getGroups().remove(getGroup());
+                pmgr.saveGroup(getGroup());
+                WebloggerFactory.getWeblogger().flush();
+
+                // clear field after success
+                setSubUrl(null);
+
+                addMessage("planetSubscription.success.deleted");
+
+            } catch (RollerException ex) {
+                LOGGER.error("Error removing planet subscription", ex);
+                addError("planetSubscription.error.deleting");
+            }
         }
 
         return LIST;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileTag.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileTag.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileTag.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileTag.java Sat Sep  7 14:25:18 2013
@@ -76,10 +76,12 @@ public class MediaFileTag implements Ser
     }
 
     public boolean equals(Object other) {
-        if (other == this)
+        if (other == this) {
             return true;
-        if (other instanceof MediaFileTag != true)
+        }
+        if (!(other instanceof MediaFileTag)) {
             return false;
+        }
         MediaFileTag o = (MediaFileTag) other;
         return new EqualsBuilder().append(getName(), o.getName())
                 .append(getMediaFile(), o.getMediaFile()).isEquals();

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthAccessorRecord.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthAccessorRecord.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthAccessorRecord.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthAccessorRecord.java Sat Sep  7 14:25:18 2013
@@ -127,7 +127,7 @@ public class OAuthAccessorRecord impleme
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(this.getConsumerKey());
         buf.append("}");
@@ -135,8 +135,12 @@ public class OAuthAccessorRecord impleme
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof OAuthAccessorRecord != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof OAuthAccessorRecord)) {
+            return false;
+        }
         OAuthAccessorRecord o = (OAuthAccessorRecord)other;
         return new EqualsBuilder()
             .append(getConsumerKey(), o.getConsumerKey())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthConsumerRecord.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthConsumerRecord.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthConsumerRecord.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/OAuthConsumerRecord.java Sat Sep  7 14:25:18 2013
@@ -80,7 +80,7 @@ public class OAuthConsumerRecord impleme
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(this.getConsumerKey());
         buf.append("}");
@@ -88,8 +88,12 @@ public class OAuthConsumerRecord impleme
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof OAuthConsumerRecord != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof OAuthConsumerRecord)) {
+            return false;
+        }
         OAuthConsumerRecord o = (OAuthConsumerRecord)other;
         return new EqualsBuilder()
             .append(getConsumerKey(), o.getConsumerKey())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingQueueEntry.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingQueueEntry.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingQueueEntry.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingQueueEntry.java Sat Sep  7 14:25:18 2013
@@ -170,7 +170,7 @@ public class PingQueueEntry implements S
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getEntryTime());
@@ -180,8 +180,12 @@ public class PingQueueEntry implements S
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof PingQueueEntry != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof PingQueueEntry)) {
+            return false;
+        }
         PingQueueEntry o = (PingQueueEntry)other;
         return new EqualsBuilder()
             .append(getEntryTime(), o.getEntryTime()) 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingTarget.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingTarget.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingTarget.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/PingTarget.java Sat Sep  7 14:25:18 2013
@@ -97,7 +97,7 @@ public class PingTarget implements Seria
 
     /**
      * get the name of this ping target.  This is a name assigned by the administrator or a user (for custom) targets.
-     * It is deescriptive and is not necessarily unique.
+     * It is descriptive and is not necessarily unique.
      *
      * @return the name of this ping target
      */
@@ -226,7 +226,7 @@ public class PingTarget implements Seria
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());
@@ -238,8 +238,12 @@ public class PingTarget implements Seria
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof PingTarget != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof PingTarget)) {
+            return false;
+        }
         PingTarget o = (PingTarget)other;
         return new EqualsBuilder()
             .append(getId(), o.getId()) 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/RuntimeConfigProperty.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/RuntimeConfigProperty.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/RuntimeConfigProperty.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/RuntimeConfigProperty.java Sat Sep  7 14:25:18 2013
@@ -86,8 +86,12 @@ public class RuntimeConfigProperty imple
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof RuntimeConfigProperty != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof RuntimeConfigProperty)) {
+            return false;
+        }
         RuntimeConfigProperty o = (RuntimeConfigProperty)other;
         return new EqualsBuilder()
         .append(getName(), o.getName())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StatCount.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StatCount.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StatCount.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StatCount.java Sat Sep  7 14:25:18 2013
@@ -44,11 +44,11 @@ public class StatCount { 
     private String weblogHandle = null;
 
     public StatCount(String subjectId, String subjectNameShort, String subjectNameLong, String typeKey, long count) {
-        this.setSubjectId(subjectId);
-        this.setSubjectNameShort(subjectNameShort);
-        this.setSubjectNameLong(subjectNameLong);
-        this.setTypeKey(typeKey);
-        this.setCount(count);
+        this.subjectId = subjectId;
+        this.subjectNameShort = subjectNameShort;
+        this.subjectNameLong = subjectNameLong;
+        this.typeKey = typeKey;
+        this.count = count;
     } 
     
     public String getTypeKey() {
@@ -102,7 +102,7 @@ public class StatCount { 
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getWeblogHandle());
         buf.append(", ").append(getCount());
@@ -111,8 +111,12 @@ public class StatCount { 
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof StatCount != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof StatCount)) {
+            return false;
+        }
         StatCount o = (StatCount)other;
         return new EqualsBuilder()
             .append(getSubjectId(), o.getSubjectId()) 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java Sat Sep  7 14:25:18 2013
@@ -31,7 +31,7 @@ public class TaskLock implements Seriali
     
     private String id = UUIDGenerator.generateUUID();
     private String name = null;
-    private Date timeAquired = null;
+    private Date timeAcquired = null;
     private int timeLeased = 0;
     private Date lastRun = null;
     private String clientId = null;
@@ -69,8 +69,8 @@ public class TaskLock implements Seriali
     public Date getLeaseExpiration() {
         
         Date leaseAcquisitionTime = new Date(0);
-        if(getTimeAquired() != null) {
-            leaseAcquisitionTime = getTimeAquired();
+        if(getTimeAcquired() != null) {
+            leaseAcquisitionTime = getTimeAcquired();
         }
         
         // calculate lease expiration time
@@ -89,7 +89,7 @@ public class TaskLock implements Seriali
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());
-        buf.append(", ").append(getTimeAquired());
+        buf.append(", ").append(getTimeAcquired());
         buf.append(", ").append(getTimeLeased());
         buf.append("}");
         return buf.toString();
@@ -98,9 +98,12 @@ public class TaskLock implements Seriali
     @Override
     public boolean equals(Object other) {
         
-        if(this == other) return true;
-        if( !(other instanceof TaskLock) ) return false;
-        
+        if(this == other) {
+            return true;
+        }
+        if( !(other instanceof TaskLock) ) {
+            return false;
+        }
         // our natural key, or business key, is our name
         final TaskLock that = (TaskLock) other;
         return this.getName().equals(that.getName());
@@ -108,7 +111,7 @@ public class TaskLock implements Seriali
     
     @Override
     public int hashCode() {
-        // our natrual key, or business key, is our name
+        // our natural key, or business key, is our name
         return this.getName().hashCode();
     }
     
@@ -131,12 +134,12 @@ public class TaskLock implements Seriali
     }
 
     
-    public Date getTimeAquired() {
-        return timeAquired;
+    public Date getTimeAcquired() {
+        return timeAcquired;
     }
 
-    public void setTimeAquired(Date timeAquired) {
-        this.timeAquired = timeAquired;
+    public void setTimeAcquired(Date timeAcquired) {
+        this.timeAcquired = timeAcquired;
     }
 
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/User.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/User.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/User.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/User.java Sat Sep  7 14:25:18 2013
@@ -21,9 +21,7 @@ package org.apache.roller.weblogger.pojo
 import java.io.Serializable;
 import java.util.Collections;
 import java.util.Date;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import org.apache.commons.lang.builder.EqualsBuilder;
 import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.roller.weblogger.WebloggerException;
@@ -55,8 +53,6 @@ public class User implements Serializabl
     private Boolean enabled = Boolean.TRUE;
     private String  activationCode;
     
-    private Set roles = new HashSet();
-
     public User() {
     }
     
@@ -131,7 +127,7 @@ public class User implements Serializabl
         
         String encrypt = WebloggerConfig.getProperty("passwds.encryption.enabled");
         String algorithm = WebloggerConfig.getProperty("passwds.encryption.algorithm");
-        if (new Boolean(encrypt)) {
+        if (Boolean.valueOf(encrypt)) {
             setPassword(Utilities.encodePassword(newPassword, algorithm));
         } else {
             setPassword(newPassword);
@@ -275,7 +271,7 @@ public class User implements Serializabl
     //------------------------------------------------------- Good citizenship
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getUserName());
@@ -288,8 +284,12 @@ public class User implements Serializabl
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof User != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof User)) {
+            return false;
+        }
         User o = (User)other;
         return new EqualsBuilder().append(getUserName(), o.getUserName()).isEquals();
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserAttribute.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserAttribute.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserAttribute.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserAttribute.java Sat Sep  7 14:25:18 2013
@@ -45,12 +45,13 @@ public class UserAttribute implements Se
             this.name = name;
         }        
         private final String name;
+
         @Override
         public String toString() {
             return name;
         }     
         public String get() {
-            return name.toString();
+            return name;
         }
     }
 
@@ -97,7 +98,7 @@ public class UserAttribute implements Se
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getUserName());
@@ -108,8 +109,12 @@ public class UserAttribute implements Se
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof UserRole != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof UserRole)) {
+            return false;
+        }
         UserAttribute o = (UserAttribute)other;
         return new EqualsBuilder()
             .append(getUserName(), o.getUserName())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserRole.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserRole.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserRole.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/UserRole.java Sat Sep  7 14:25:18 2013
@@ -75,7 +75,7 @@ public class UserRole implements Seriali
     //------------------------------------------------------- Good citizenship
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getUserName());
@@ -85,8 +85,12 @@ public class UserRole implements Seriali
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof UserRole != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof UserRole)) {
+            return false;
+        }
         UserRole o = (UserRole)other;
         return new EqualsBuilder()
         .append(getRole(), o.getRole())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java Sat Sep  7 14:25:18 2013
@@ -240,7 +240,7 @@ public class WeblogBookmark implements S
     //------------------------------------------------------- Good citizenship
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getUrl());
@@ -249,8 +249,12 @@ public class WeblogBookmark implements S
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogBookmark != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogBookmark)) {
+            return false;
+        }
         WeblogBookmark o = (WeblogBookmark)other;
         return new EqualsBuilder()
         .append(getName(), o.getName())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmarkFolder.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmarkFolder.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmarkFolder.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmarkFolder.java Sat Sep  7 14:25:18 2013
@@ -89,7 +89,7 @@ public class WeblogBookmarkFolder implem
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getPath());
@@ -99,7 +99,9 @@ public class WeblogBookmarkFolder implem
     
     public boolean equals(Object other) {
         
-        if (other == null) return false;
+        if (other == null) {
+            return false;
+        }
         
         if (other instanceof WeblogBookmarkFolder) {
             WeblogBookmarkFolder o = (WeblogBookmarkFolder) other;
@@ -143,7 +145,9 @@ public class WeblogBookmarkFolder implem
     
     public void setId(String id) {
         // Form bean workaround: empty string is never a valid id
-        if (id != null && id.trim().length() == 0) return; 
+        if (id != null && id.trim().length() == 0) {
+            return;
+        }
         this.id = id;
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryAttribute.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryAttribute.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryAttribute.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryAttribute.java Sat Sep  7 14:25:18 2013
@@ -77,7 +77,7 @@ public class WeblogEntryAttribute implem
     //------------------------------------------------------- Good citizenship
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());
@@ -87,8 +87,12 @@ public class WeblogEntryAttribute implem
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogEntryAttribute != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogEntryAttribute)) {
+            return false;
+        }
         WeblogEntryAttribute o = (WeblogEntryAttribute)other;
         return new EqualsBuilder()
         .append(getName(), o.getName())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryComment.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryComment.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryComment.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryComment.java Sat Sep  7 14:25:18 2013
@@ -277,7 +277,7 @@ public class WeblogEntryComment implemen
      * Indicates that weblog owner considers this comment to be spam.
      */
     public Boolean getSpam() {
-        return new Boolean(SPAM.equals(getStatus()));
+        return SPAM.equals(getStatus());
     }
     
     
@@ -285,7 +285,7 @@ public class WeblogEntryComment implemen
      * True if comment has is pending moderator approval.
      */
     public Boolean getPending() {
-        return new Boolean(PENDING.equals(getStatus()));
+        return PENDING.equals(getStatus());
     }
     
     
@@ -293,7 +293,7 @@ public class WeblogEntryComment implemen
      * Indicates that comment has been approved for display on weblog.
      */
     public Boolean getApproved() {
-        return new Boolean(APPROVED.equals(getStatus()));
+        return APPROVED.equals(getStatus());
     }
     
     
@@ -310,7 +310,7 @@ public class WeblogEntryComment implemen
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());
@@ -321,8 +321,12 @@ public class WeblogEntryComment implemen
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogEntryComment != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogEntryComment)) {
+            return false;
+        }
         WeblogEntryComment o = (WeblogEntryComment)other;
         return new EqualsBuilder()
             .append(getName(), o.getName()) 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryTag.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryTag.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryTag.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntryTag.java Sat Sep  7 14:25:18 2013
@@ -138,7 +138,7 @@ public class WeblogEntryTag implements S
     //------------------------------------------------------- Good citizenship
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());
@@ -148,8 +148,12 @@ public class WeblogEntryTag implements S
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogEntryTag != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogEntryTag)) {
+            return false;
+        }
         WeblogEntryTag o = (WeblogEntryTag)other;
         return new EqualsBuilder()
         .append(getName(), o.getName())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogHitCount.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogHitCount.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogHitCount.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogHitCount.java Sat Sep  7 14:25:18 2013
@@ -39,7 +39,7 @@ public class WeblogHitCount implements S
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getDailyHits());
@@ -49,8 +49,12 @@ public class WeblogHitCount implements S
     
     public boolean equals(Object other) {
         
-        if(this == other) return true;
-        if( !(other instanceof WeblogHitCount) ) return false;
+        if(this == other) {
+            return true;
+        }
+        if( !(other instanceof WeblogHitCount) ) {
+            return false;
+        }
         
         // our natural key, or business key, is our weblog
         final WeblogHitCount that = (WeblogHitCount) other;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java Sat Sep  7 14:25:18 2013
@@ -343,7 +343,7 @@ public class WeblogReferrer implements S
     //------------------------------------------------------- Good citizenship
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getRequestUrl());
@@ -355,8 +355,12 @@ public class WeblogReferrer implements S
     }
     
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogReferrer != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogReferrer)) {
+            return false;
+        }
         WeblogReferrer o = (WeblogReferrer)other;
         return new EqualsBuilder()
         .append(getRefererUrl(), o.getRefererUrl())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java Sat Sep  7 14:25:18 2013
@@ -249,7 +249,7 @@ public class WeblogTemplate implements T
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());
@@ -261,8 +261,12 @@ public class WeblogTemplate implements T
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogTemplate != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogTemplate)) {
+            return false;
+        }
         WeblogTemplate o = (WeblogTemplate)other;
         return new EqualsBuilder()
             .append(getName(), o.getName())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeAssoc.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeAssoc.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeAssoc.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeAssoc.java Sat Sep  7 14:25:18 2013
@@ -92,7 +92,7 @@ public class WeblogThemeAssoc implements
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append("}");
@@ -100,8 +100,12 @@ public class WeblogThemeAssoc implements
     }
 
     public boolean equals(Object other) {
-        if (other == this) return true;
-        if (other instanceof WeblogThemeAssoc != true) return false;
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof WeblogThemeAssoc)) {
+            return false;
+        }
         WeblogThemeAssoc o = (WeblogThemeAssoc) other;
         return new EqualsBuilder()
             .append(getId(), o.getId())

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java Sat Sep  7 14:25:18 2013
@@ -87,7 +87,7 @@ public class WeblogThemeTemplateCode imp
 	// ------------------------------------------------------- Good citizenship
 
 	public String toString() {
-		StringBuffer buf = new StringBuffer();
+		StringBuilder buf = new StringBuilder();
 		buf.append("{");
 		buf.append(getId());
 		buf.append(", ").append(getTemplateId());
@@ -98,10 +98,12 @@ public class WeblogThemeTemplateCode imp
 	}
 
 	public boolean equals(Object other) {
-		if (other == this)
-			return true;
-		if (other instanceof WeblogThemeTemplateCode != true)
-			return false;
+		if (other == this) {
+            return true;
+        }
+		if (!(other instanceof WeblogThemeTemplateCode)) {
+            return false;
+        }
 		WeblogThemeTemplateCode o = (WeblogThemeTemplateCode) other;
 		return new EqualsBuilder().append(getTemplateId(), o.getTemplateId())
 				.append(getTemplate(), o.getTemplate()).isEquals();

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CharEncodingFilter.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CharEncodingFilter.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CharEncodingFilter.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CharEncodingFilter.java Sat Sep  7 14:25:18 2013
@@ -63,7 +63,9 @@ public class CharEncodingFilter implemen
      */
     public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
     throws IOException, ServletException {
-        if (mLogger.isDebugEnabled()) mLogger.debug("Processing CharEncodingFilter");
+        if (mLogger.isDebugEnabled()) {
+            mLogger.debug("Processing CharEncodingFilter");
+        }
         try {
         	if (!"UTF-8".equals(req.getCharacterEncoding())) {
         		// only set encoding if not already UTF-8
@@ -71,7 +73,9 @@ public class CharEncodingFilter implemen
         		// is already too late to set request encoding without getting a WARN level log message
         		req.setCharacterEncoding("UTF-8");
         	}
-            if (mLogger.isDebugEnabled()) mLogger.debug("Set request character encoding to UTF-8");
+            if (mLogger.isDebugEnabled()) {
+                mLogger.debug("Set request character encoding to UTF-8");
+            }
             
         } catch (UnsupportedEncodingException e) {
             // This should never happen since UTF-8 is a Java-specified required encoding.

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.java Sat Sep  7 14:25:18 2013
@@ -172,8 +172,9 @@ public class UtilitiesModel implements M
      */
     public String formatDate(Date d, String fmt, TimeZone tzOverride) {
         
-        if(d == null || fmt == null)
+        if (d == null || fmt == null) {
             return fmt;
+        }
         
         SimpleDateFormat format = new SimpleDateFormat(fmt, weblog.getLocaleInstance());
         if(tzOverride != null) {
@@ -321,7 +322,9 @@ public class UtilitiesModel implements M
     }    
     
     public String hexEncode(String str) {
-        if (StringUtils.isEmpty(str)) return str;
+        if (StringUtils.isEmpty(str)) {
+            return str;
+        }
         
         return RegexUtil.encode(str);
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesListPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesListPager.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesListPager.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesListPager.java Sat Sep  7 14:25:18 2013
@@ -29,7 +29,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.roller.weblogger.business.URLStrategy;
 import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.WebloggerFactory;
-import org.apache.roller.weblogger.business.UserManager;
 import org.apache.roller.weblogger.business.WeblogEntryManager;
 import org.apache.roller.weblogger.pojos.User;
 import org.apache.roller.weblogger.pojos.WeblogEntry;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet.java?rev=1520777&r1=1520776&r2=1520777&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/RSDServlet.java Sat Sep  7 14:25:18 2013
@@ -126,7 +126,9 @@ public class RSDServlet extends HttpServ
             // nobody wants to render my content :(
             log.error("Couldn't find renderer for rsd template", e);
             
-            if(!response.isCommitted()) response.reset();
+            if (!response.isCommitted()) {
+                response.reset();
+            }
             response.sendError(HttpServletResponse.SC_NOT_FOUND);
             return;
         }
@@ -144,7 +146,9 @@ public class RSDServlet extends HttpServ
             // bummer, error during rendering
             log.error("Error during rendering for rsd template", e);
             
-            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/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=1520777&r1=1520776&r2=1520777&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 Sat Sep  7 14:25:18 2013
@@ -75,9 +75,10 @@ public class ThemeResourceLoader extends
 			// parse the name ... theme templates name are
 			// <theme>:<template>|<deviceType>
 			String[] split = name.split(":", 2);
-			if (split.length < 2)
+			if (split.length < 2) {
 				throw new ResourceNotFoundException("Invalid ThemeRL key "
 						+ name);
+            }
 
 			// lookup the template from the proper theme
 			ThemeManager themeMgr = WebloggerFactory.getWeblogger()
@@ -85,10 +86,11 @@ public class ThemeResourceLoader extends
 			Theme theme = themeMgr.getTheme(split[0]);
 			ThemeTemplate template = theme.getTemplateByName(split[1]);
 
-			if (template == null)
+			if (template == null) {
 				throw new ResourceNotFoundException("Template [" + split[1]
 						+ "] doesn't seem to be part of theme [" + split[0]
 						+ "]");
+            }
 
 			final String contents;
 			if (template.getTemplateCode(deviceType) != null) {



Mime
View raw message