roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1505788 - in /roller/trunk/app/src/main/java/org/apache/roller: planet/business/ planet/pojos/ planet/util/ util/ weblogger/business/ weblogger/ui/core/util/menu/ weblogger/ui/rendering/model/ weblogger/ui/rendering/velocity/ weblogger/ui/...
Date Mon, 22 Jul 2013 20:12:48 GMT
Author: gmazza
Date: Mon Jul 22 20:12:47 2013
New Revision: 1505788

URL: http://svn.apache.org/r1505788
Log:
More Sonar complaints fixed.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/planet/business/PlanetManager.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/util/Utilities.java
    roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/util/menu/MenuHelper.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringTagSupport.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.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/I18nUtils.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/URLUtilities.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/cache/CacheHandler.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/MemberEntrySet.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/business/PlanetManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/business/PlanetManager.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/business/PlanetManager.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/business/PlanetManager.java Mon
Jul 22 20:12:47 2013
@@ -33,122 +33,122 @@ import org.apache.roller.planet.pojos.Su
 public interface PlanetManager extends Manager {
     
     
-    public void savePlanet(Planet planet) throws RollerException;
+    void savePlanet(Planet planet) throws RollerException;
     
     
-    public void deletePlanet(Planet planet) throws RollerException;
+    void deletePlanet(Planet planet) throws RollerException;
     
     
-    public Planet getWeblogger(String handle) throws RollerException;
+    Planet getWeblogger(String handle) throws RollerException;
     
     
-    public Planet getWebloggerById(String id) throws RollerException;
+    Planet getWebloggerById(String id) throws RollerException;
     
     
-    public List getWebloggers() throws RollerException;
+    List getWebloggers() throws RollerException;
     
     
     /**
      * Save new or update existing a group
      */
-    public void saveGroup(PlanetGroup sub) throws RollerException;
+    void saveGroup(PlanetGroup sub) throws RollerException;
     
     
     /** 
      * Delete group and any subscriptions that are orphaned. 
      */
-    public void deleteGroup(PlanetGroup group) throws RollerException;
+    void deleteGroup(PlanetGroup group) throws RollerException;
     
     
-    public PlanetGroup getGroup(Planet planet, String handle) throws RollerException;
+    PlanetGroup getGroup(Planet planet, String handle) throws RollerException;
     
     
     /**
      * Get group by ID rather than handle.
      */
-    public PlanetGroup getGroupById(String id) throws RollerException;
+    PlanetGroup getGroupById(String id) throws RollerException;
     
     
     /**
      * Save or update a subscription
      */
-    public void saveSubscription(Subscription sub) throws RollerException;
+    void saveSubscription(Subscription sub) throws RollerException;
     
     
     /** 
      * Delete subscription, remove it from groups, cache, etc. 
      */
-    public void deleteSubscription(Subscription group) throws RollerException;
+    void deleteSubscription(Subscription group) throws RollerException;
     
     
     /**
      * Get subscription by feedUrl.
      */
-    public Subscription getSubscription(String feedUrl) throws RollerException;
+    Subscription getSubscription(String feedUrl) throws RollerException;
     
     
     /**
      * Get subscription by ID rather than feedUrl.
      */
-    public Subscription getSubscriptionById(String id) throws RollerException;
+    Subscription getSubscriptionById(String id) throws RollerException;
     
     
     /**
      * Get all subscriptions.
      */
-    public List getSubscriptions() throws RollerException;
+    List getSubscriptions() throws RollerException;
     
     
     /**
      * Get total number of subscriptions.
      */
-    public int getSubscriptionCount() throws RollerException;
+    int getSubscriptionCount() throws RollerException;
     
     
     /**
      * Get top X subscriptions.
      */
-    public List getTopSubscriptions(int offset, int len) throws RollerException;
+    List getTopSubscriptions(int offset, int len) throws RollerException;
     
     
     /**
      * Get top X subscriptions, restricted by group.
      */
-    public List getTopSubscriptions(PlanetGroup group, int offset, int len) 
+    List getTopSubscriptions(PlanetGroup group, int offset, int len)
         throws RollerException;
     
     
     /**
      * Save new or update existing entry
      */
-    public void saveEntry(SubscriptionEntry entry) throws RollerException;
+    void saveEntry(SubscriptionEntry entry) throws RollerException;
     
     
     /** 
      * Delete entry. 
      */
-    public void deleteEntry(SubscriptionEntry entry) throws RollerException;
+    void deleteEntry(SubscriptionEntry entry) throws RollerException;
     
     
     /**
      * Delete all entries for a subscription.
      *
-     * @param subscription The subscription to delete entries from.
+     * @param sub The subscription to delete entries from.
      * @throws RollerException If there is a problem doing the delete.
      */
-    public void deleteEntries(Subscription sub) throws RollerException;
+    void deleteEntries(Subscription sub) throws RollerException;
     
     
     /**
      * Lookup an entry by id.
      */
-    public SubscriptionEntry getEntryById(String id) throws RollerException;
+    SubscriptionEntry getEntryById(String id) throws RollerException;
     
     
     /**
      * Get entries in a single feed as list of SubscriptionEntry objects.
      */
-    public List getEntries(Subscription sub, int offset, int len) 
+    List getEntries(Subscription sub, int offset, int len)
         throws RollerException;
     
     
@@ -159,7 +159,7 @@ public interface PlanetManager extends M
      * @param offset Offset into results (for paging)
      * @param len Maximum number of results to return (for paging)
      */
-    public List getEntries(PlanetGroup group, int offset, int len) 
+    List getEntries(PlanetGroup group, int offset, int len)
         throws RollerException;
     
     
@@ -173,7 +173,7 @@ public interface PlanetManager extends M
      * @param offset Offset into results (for paging)
      * @param len Maximum number of results to return (for paging)
      */
-    public List getEntries(PlanetGroup group, 
+    List getEntries(PlanetGroup group,
                            Date startDate, 
                            Date endDate,
                            int offset, 

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=1505788&r1=1505787&r2=1505788&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 Mon Jul
22 20:12:47 2013
@@ -33,8 +33,8 @@ import org.apache.roller.weblogger.busin
  * @hibernate.class lazy="true" table="rag_group"
  */
 public class PlanetGroup implements Serializable, Comparable {
-    
-    transient private String[] catArray = null;
+
+    private transient String[] catArray = null;
     
     // attributes
     private String id = UUIDGenerator.generateUUID();

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/util/Utilities.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/util/Utilities.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/util/Utilities.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/util/Utilities.java Mon Jul 22
20:12:47 2013
@@ -33,7 +33,7 @@ public class Utilities {
     /** The <code>Log</code> instance for this class. */
     private static Log mLogger = LogFactory.getLog(Utilities.class);
     
-    public final static String TAG_SPLIT_CHARS = " ,\n\r\f\t";
+    public static final String TAG_SPLIT_CHARS = " ,\n\r\f\t";
       
     //------------------------------------------------------------------------
     /** Strip jsessionid off of a URL */

Modified: roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java Mon Jul 22 20:12:47
2013
@@ -318,13 +318,15 @@ public abstract class DateUtil {
         // false if either value is null
         if (startDate == null || endDate == null) { return false; }
         
-        if (equalOK) {
+        if (equalOK && startDate.equals(endDate)) {
             // true if they are equal
-            if (startDate.equals(endDate)) { return true; }
+            return true;
         }
         
         // true if endDate after startDate
-        if (endDate.after(startDate)) { return true; }
+        if (endDate.after(startDate)) {
+            return true;
+        }
         
         return false;
     }
@@ -351,7 +353,7 @@ public abstract class DateUtil {
     
     /** 
      * Returns a "friendly" date format.
-     * @param mimimalFormat Should the date format allow single digits.
+     * @param minimalFormat Should the date format allow single digits.
      **/
     public static SimpleDateFormat friendlyDateFormat(boolean minimalFormat) {
         if (minimalFormat) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java
Mon Jul 22 20:12:47 2013
@@ -33,8 +33,8 @@ import org.apache.roller.weblogger.util.
  */
 public interface MediaFileManager {
 
-    public int MAX_WIDTH = 120;
-    public int MAX_HEIGHT = 120;
+    int MAX_WIDTH = 120;
+    int MAX_HEIGHT = 120;
 
     /**
      * Initialization; deal with upgrade migrations, etc.

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java
Mon Jul 22 20:12:47 2013
@@ -59,7 +59,7 @@ public final class WebloggerFactory {
      * @return Weblogger An instance of Weblogger.
      * @throws IllegalStateException If the app has not been properly bootstrapped yet.
      */
-    public static final Weblogger getWeblogger() {
+    public static Weblogger getWeblogger() {
         if (webloggerProvider == null) {
             throw new IllegalStateException("Roller Weblogger has not been bootstrapped yet");
         }
@@ -78,7 +78,7 @@ public final class WebloggerFactory {
      * @throws IllegalStateException If the app has not been properly prepared yet.
      * @throws BootstrapException If an error happens during the bootstrap process.
      */
-    public static final void bootstrap() throws BootstrapException {
+    public static void bootstrap() throws BootstrapException {
         
         // if the app hasn't been properly started so far then bail
         if (!WebloggerStartup.isPrepared()) {
@@ -115,7 +115,7 @@ public final class WebloggerFactory {
      * @throws IllegalStateException If the app has not been properly prepared yet.
      * @throws BootstrapException If an error happens during the bootstrap process.
      */
-    public static final void bootstrap(WebloggerProvider provider) 
+    public static void bootstrap(WebloggerProvider provider)
             throws BootstrapException {
         
         // if the app hasn't been properly started so far then bail

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/util/menu/MenuHelper.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/util/menu/MenuHelper.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/util/menu/MenuHelper.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/util/menu/MenuHelper.java
Mon Jul 22 20:12:47 2013
@@ -118,33 +118,29 @@ public class MenuHelper {
                 includeTab = ! getBooleanProperty(configTab.getDisabledProperty());
             }
             
-            if (includeTab) {
-                // user roles check
-                if (configTab.getGlobalPermissionActions() != null
-                        && !configTab.getGlobalPermissionActions().isEmpty()) {
-                    try {
-                        GlobalPermission perm = 
-                            new GlobalPermission(configTab.getGlobalPermissionActions());
-                        if (!umgr.checkPermission(perm, user)) {
-                            includeTab = false;
-                        }
-                    } catch (WebloggerException ex) {
-                        log.debug("ERROR: fetching user roles", ex);
+            // user roles check
+            if (includeTab && configTab.getGlobalPermissionActions() != null
+                    && !configTab.getGlobalPermissionActions().isEmpty()) {
+                try {
+                    GlobalPermission perm =
+                        new GlobalPermission(configTab.getGlobalPermissionActions());
+                    if (!umgr.checkPermission(perm, user)) {
                         includeTab = false;
                     }
+                } catch (WebloggerException ex) {
+                    log.debug("ERROR: fetching user roles", ex);
+                    includeTab = false;
                 }
             }
-            
-            if (includeTab) {
-                // weblog permissions check
-                if (configTab.getWeblogPermissionActions() != null 
-                        && !configTab.getWeblogPermissionActions().isEmpty()) {
-                    WeblogPermission perm = 
-                        new WeblogPermission(weblog, configTab.getWeblogPermissionActions());
-                    includeTab = umgr.checkPermission(perm, user);
-                }
+
+            // weblog permissions check
+            if (includeTab && configTab.getWeblogPermissionActions() != null
+                    && !configTab.getWeblogPermissionActions().isEmpty()) {
+                WeblogPermission perm =
+                    new WeblogPermission(weblog, configTab.getWeblogPermissionActions());
+                includeTab = umgr.checkPermission(perm, user);
             }
-            
+
             if (includeTab) {
                 log.debug("tab allowed - "+configTab.getName());
                 
@@ -162,33 +158,30 @@ public class MenuHelper {
                     log.debug("config tab item = "+configTabItem.getName());
                     
                     boolean includeItem = true;
+
                     if (configTabItem.getEnabledProperty() != null) {
                         includeItem = getBooleanProperty(configTabItem.getEnabledProperty());
                     } else if (configTabItem.getDisabledProperty() != null) {
                         includeItem = ! getBooleanProperty(configTabItem.getDisabledProperty());
                     }
                     
-                    if (includeItem) {
-                        // user roles check
-                        if (configTabItem.getGlobalPermissionActions() != null
-                                && !configTabItem.getGlobalPermissionActions().isEmpty())
{
-                            GlobalPermission perm = 
-                                new GlobalPermission(configTabItem.getGlobalPermissionActions());
-                            if (!umgr.checkPermission(perm, user)) {
-                                includeItem = false;
-                            }
+                    // user roles check
+                    if (includeItem && configTabItem.getGlobalPermissionActions()
!= null
+                            && !configTabItem.getGlobalPermissionActions().isEmpty())
{
+                        GlobalPermission perm =
+                            new GlobalPermission(configTabItem.getGlobalPermissionActions());
+                        if (!umgr.checkPermission(perm, user)) {
+                            includeItem = false;
                         }
                     }
-                    
-                    if (includeItem) {
-                        // weblog permissions check
-                        if (configTabItem.getWeblogPermissionActions() != null
-                                && !configTabItem.getWeblogPermissionActions().isEmpty())
{
-                            WeblogPermission perm = new WeblogPermission(weblog, configTabItem.getWeblogPermissionActions());
-                            includeItem = umgr.checkPermission(perm, user);
-                        }
+
+                    // weblog permissions check
+                    if (includeItem && configTabItem.getWeblogPermissionActions()
!= null
+                            && !configTabItem.getWeblogPermissionActions().isEmpty())
{
+                        WeblogPermission perm = new WeblogPermission(weblog, configTabItem.getWeblogPermissionActions());
+                        includeItem = umgr.checkPermission(perm, user);
                     }
-                    
+
                     if (includeItem) {
                         log.debug("tab item allowed - "+configTabItem.getName());
                         

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
Mon Jul 22 20:12:47 2013
@@ -19,16 +19,10 @@
 package org.apache.roller.weblogger.ui.rendering.model;
 
 import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.jsp.PageContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
-import org.apache.roller.weblogger.business.URLStrategy;
-import org.apache.roller.weblogger.config.WebloggerConfig;
 import org.apache.roller.weblogger.pojos.Weblog;
-import org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest;
 import org.apache.roller.weblogger.util.Utilities;
 
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
Mon Jul 22 20:12:47 2013
@@ -22,7 +22,6 @@ import java.io.InputStream;
 import java.util.Properties;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.roller.weblogger.config.WebloggerConfig;
 import org.apache.roller.weblogger.ui.core.RollerContext;
 import org.apache.roller.weblogger.ui.rendering.mobile.MobileDeviceRepository;
 import org.apache.velocity.Template;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringTagSupport.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringTagSupport.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringTagSupport.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringTagSupport.java
Mon Jul 22 20:12:47 2013
@@ -36,7 +36,7 @@ import javax.servlet.jsp.tagext.BodyTagS
  * 
  * @author bayard@generationjava.com
  */
-abstract public class StringTagSupport extends BodyTagSupport {
+public abstract class StringTagSupport extends BodyTagSupport {
 
 
 
@@ -125,7 +125,7 @@ abstract public class StringTagSupport e
         return (EVAL_PAGE);
     }
 
-    /** 
+    /**
      * Perform an operation on the passed String.
      * The object returned by this operation (if not null) will be
      * associated to PageContext attribute represented by this.var.
@@ -134,9 +134,9 @@ abstract public class StringTagSupport e
      *
      * @return Object result of operation upon passed String
      */
-  public Object evaluateString(String str) throws JspException {
-    return null;
-  }
+    public Object evaluateString(String str) throws JspException {
+        return null;
+    }
   
     /** 
      * Perform a transformation on the passed in String.
@@ -145,7 +145,7 @@ abstract public class StringTagSupport e
      *
      * @return String result of operation upon passed in String
      */
-    abstract public String changeString(String str) throws JspException;
+    public abstract String changeString(String str) throws JspException;
 
     /**
      * Initialise any properties to default values.

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java Mon Jul
22 20:12:47 2013
@@ -30,14 +30,14 @@ import org.apache.commons.lang.StringUti
  * @author bayard@generationjava.com
  * @version 0.4 20010812
  */
-final public class StringW {
+public final class StringW {
 
     /**
      * Quote a string so that it may be used in a regular expression 
      * without any parts of the string being considered as a 
      * part of the regular expression's control characters.
      */
-    static public String quoteRegularExpression(String str) {
+    public static String quoteRegularExpression(String str) {
         // replace ? + * / . ^ $ as long as they're not in character 
         // class. so must be done by hand
         char[] chrs = str.toCharArray();
@@ -67,7 +67,7 @@ final public class StringW {
      * use newlines as the delimiter. If a word is over 80 characters long 
      * use a - sign to split it.
      */
-    static public String wordWrap(String str) {
+    public static String wordWrap(String str) {
         return wordWrap(str, 80, "\n", "-", true);
     }
     /**
@@ -75,7 +75,7 @@ final public class StringW {
      * use newlines as the delimiter. If a word is over the width in lenght 
      * use a - sign to split it.
      */
-    static public String wordWrap(String str, int width) {
+    public static String wordWrap(String str, int width) {
         return wordWrap(str, width, "\n", "-", true);
     }
     /**
@@ -88,7 +88,7 @@ final public class StringW {
      *
      * @return String that has been word wrapped (with the delim inside width boundaries)
      */
-  static public String wordWrap(String str, int width, String delim, String split ) {
+  public static String wordWrap(String str, int width, String delim, String split ) {
     return wordWrap(str, width, delim, split, true);
   }
   
@@ -103,7 +103,7 @@ final public class StringW {
      *
      * @return String that has been word wrapped
      */
-    static public String wordWrap(String str, int width, String delim,
+    public static String wordWrap(String str, int width, String delim,
                                   String split, boolean delimInside) {
         int sz = str.length();
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java Mon Jul 22
20:12:47 2013
@@ -26,9 +26,9 @@ import org.apache.commons.lang.StringUti
  * @author bayard@generationjava.com
  * @version 0.4 20010812
  */
-final public class XmlW {
+public final class XmlW {
 
-    static public String escapeXml(String str) {
+    public static String escapeXml(String str) {
         str = StringUtils.replace(str,"&","&amp;");
         str = StringUtils.replace(str,"<","&lt;");
         str = StringUtils.replace(str,">","&gt;");
@@ -37,7 +37,7 @@ final public class XmlW {
         return str;
     }
 
-    static public String unescapeXml(String str) {
+    public static String unescapeXml(String str) {
         str = StringUtils.replace(str,"&amp;","&");
         str = StringUtils.replace(str,"&lt;","<");
         str = StringUtils.replace(str,"&gt;",">");
@@ -50,7 +50,7 @@ final public class XmlW {
      * Remove any xml tags from a String.
      * Same as HtmlW's method.
      */
-    static public String removeXml(String str) {
+    public static String removeXml(String str) {
         int sz = str.length();
         StringBuffer buffer = new StringBuffer(sz);
         boolean inString = false;
@@ -71,7 +71,7 @@ final public class XmlW {
         return buffer.toString();
     }
 
-    static public String getContent(String tag, String text) {
+    public static String getContent(String tag, String text) {
         int idx = XmlW.getIndexOpeningTag(tag, text);
         if(idx == -1) {
             return "";
@@ -85,10 +85,11 @@ final public class XmlW {
         return text.substring(idx+1, end);
     }
 
-    static public int getIndexOpeningTag(String tag, String text) {
+    public static int getIndexOpeningTag(String tag, String text) {
         return getIndexOpeningTag(tag, text, 0);
     }
-    static private int getIndexOpeningTag(String tag, String text, int start) {
+
+    private static int getIndexOpeningTag(String tag, String text, int start) {
         // consider whitespace?
         int idx = text.indexOf("<"+tag, start);
         if(idx == -1) {
@@ -105,10 +106,11 @@ final public class XmlW {
     // Pass in "para" and a string that starts with 
     // <para> and it will return the index of the matching </para>
     // It assumes well-formed xml. Or well enough.
-    static public int getIndexClosingTag(String tag, String text) {
+    public static int getIndexClosingTag(String tag, String text) {
         return getIndexClosingTag(tag, text, 0);
     }
-    static public int getIndexClosingTag(String tag, String text, int start) {
+
+    public static int getIndexClosingTag(String tag, String text, int start) {
         String open = "<"+tag;
         String close = "</"+tag+">";
 //        System.err.println("OPEN: "+open);
@@ -136,10 +138,11 @@ final public class XmlW {
         return nextCloseIdx;
     }
 
-    static public String getAttribute(String attribute, String text) {
+    public static String getAttribute(String attribute, String text) {
         return getAttribute(attribute, text, 0);
     }
-    static public String getAttribute(String attribute, String text, int idx) {
+
+    public static String getAttribute(String attribute, String text, int idx) {
          int close = text.indexOf(">", idx);
          int attrIdx = text.indexOf(attribute+"=\"", idx);
          if(attrIdx == -1) {

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=1505788&r1=1505787&r2=1505788&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 Mon Jul
22 20:12:47 2013
@@ -417,11 +417,9 @@ public class Blacklist {
                 }
             }
             finally {
-                if (matches) {
+                if (matches && mLogger.isDebugEnabled()) {
                     // Log the matched rule in debug mode
-                    if (mLogger.isDebugEnabled()) {
-                        mLogger.debug("matched:" + rule + ":");
-                    }
+                    mLogger.debug("matched:" + rule + ":");
                 }
             }
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nUtils.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nUtils.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nUtils.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/I18nUtils.java Mon Jul
22 20:12:47 2013
@@ -27,7 +27,7 @@ import org.apache.commons.lang.StringUti
  */
 public final class I18nUtils {
     
-    public static final Locale toLocale(String locale) {
+    public static Locale toLocale(String locale) {
         if (locale != null) {
             String[] localeStr = StringUtils.split(locale,"_");
             if (localeStr.length == 1) {

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=1505788&r1=1505787&r2=1505788&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 Mon
Jul 22 20:12:47 2013
@@ -45,7 +45,7 @@ public final class MediacastUtil {
     /**
      * Validate a Mediacast resource.
      */
-    public static final MediacastResource lookupResource(String url) 
+    public static MediacastResource lookupResource(String url)
             throws MediacastException {
         
         if(url == null || url.trim().length() ==0) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java Mon
Jul 22 20:12:47 2013
@@ -31,14 +31,14 @@ import java.util.Map;
  */
 public final class URLUtilities {
     
-    // non-intantiable
+    // non-instantiable
     private URLUtilities() {}
     
     
     /**
      * Compose a map of key=value params into a query string.
      */
-    public static final String getQueryString(Map params) {
+    public static String getQueryString(Map params) {
         
         if(params == null) {
             return null;
@@ -68,7 +68,7 @@ public final class URLUtilities {
     /**
      * URL encode a string using UTF-8.
      */
-    public static final String encode(String str) {
+    public static String encode(String str) {
         String encodedStr = str;
         try {
             encodedStr = URLEncoder.encode(str, "UTF-8");
@@ -82,7 +82,7 @@ public final class URLUtilities {
     /**
      * URL decode a string using UTF-8.
      */
-    public static final String decode(String str) {
+    public static String decode(String str) {
         String decodedStr = str;
         try {
             decodedStr = URLDecoder.decode(str, "UTF-8");
@@ -93,7 +93,7 @@ public final class URLUtilities {
     }
     
     
-    public static final String getEncodedTagsString(List tags) {
+    public static String getEncodedTagsString(List tags) {
         StringBuffer tagsString = new StringBuffer();
         if(tags != null && tags.size() > 0) {
             String tag = null;
@@ -115,9 +115,9 @@ public final class URLUtilities {
     
         
     /**
-     * URL encode a path string using UTF-8. The path seprator '/' will not be encoded
+     * URL encode a path string using UTF-8. The path separator '/' will not be encoded
      */
-    public static final String encodePath(String path) {
+    public static String encodePath(String path) {
         int i = path.indexOf('/');
         StringBuffer sb = new StringBuffer();
         while (i != -1) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java Mon Jul
22 20:12:47 2013
@@ -41,7 +41,7 @@ public class Utilities {
     /** The <code>Log</code> instance for this class. */
     private static Log mLogger = LogFactory.getLog(Utilities.class);
     
-    public final static String TAG_SPLIT_CHARS = " ,\n\r\f\t";
+    public static final String TAG_SPLIT_CHARS = " ,\n\r\f\t";
       
     private static Pattern mLinkPattern =
             Pattern.compile("<a href=.*?>", Pattern.CASE_INSENSITIVE);    

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/cache/CacheHandler.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/cache/CacheHandler.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/cache/CacheHandler.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/cache/CacheHandler.java
Mon Jul 22 20:12:47 2013
@@ -40,22 +40,22 @@ import org.apache.roller.weblogger.pojos
  */
 public interface CacheHandler {
     
-    public void invalidate(WeblogEntry entry);
+    void invalidate(WeblogEntry entry);
     
-    public void invalidate(Weblog website);
+    void invalidate(Weblog website);
     
-    public void invalidate(WeblogBookmark bookmark);
+    void invalidate(WeblogBookmark bookmark);
     
-    public void invalidate(WeblogBookmarkFolder folder);
+    void invalidate(WeblogBookmarkFolder folder);
 
-    public void invalidate(WeblogEntryComment comment);
+    void invalidate(WeblogEntryComment comment);
 
-    public void invalidate(WeblogReferrer referer);
+    void invalidate(WeblogReferrer referer);
 
-    public void invalidate(User user);
+    void invalidate(User user);
 
-    public void invalidate(WeblogCategory category);
+    void invalidate(WeblogCategory category);
 
-    public void invalidate(WeblogTemplate template);
+    void invalidate(WeblogTemplate template);
     
 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/MemberEntrySet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/MemberEntrySet.java?rev=1505788&r1=1505787&r2=1505788&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/MemberEntrySet.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/MemberEntrySet.java
Mon Jul 22 20:12:47 2013
@@ -32,7 +32,7 @@ import org.jdom.Document;
 import org.jdom.Element;
 import org.jdom.JDOMException;
 import org.jdom.input.SAXBuilder;
-import org.apache.roller.weblogger.webservices.adminprotocol.sdk.EntrySet.Types;
+
 
 /**
  * This class describes a set of member entries. 



Mime
View raw message