You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ad...@apache.org on 2021/01/04 06:23:32 UTC

[roller] branch master updated: Fixed: sonarqube issue - 'public static' fields should be constant There is no good reason to declare a field public and static without also declaring it final. Most of the time this is a kludge to share a state among several objects. But with this approach, any object can do whatever it wants with the shared state, such as setting it to null.

This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git


The following commit(s) were added to refs/heads/master by this push:
     new ce4a4b3  Fixed: sonarqube issue - 'public static' fields should be constant There is no good reason to declare a field public and static without also declaring it final. Most of the time this is a kludge to share a state among several objects. But with this approach, any object can do whatever it wants with the shared state, such as setting it to null.
ce4a4b3 is described below

commit ce4a4b37c7569a1e170788b9fb756eca98bf636b
Author: Aditya Sharma <ia...@gmail.com>
AuthorDate: Mon Jan 4 11:52:17 2021 +0530

    Fixed: sonarqube issue - 'public static' fields should be constant
    There is no good reason to declare a field public and static without also declaring it final. Most of the time this is a kludge to share a state among several objects. But with this approach, any object can do whatever it wants with the shared state, such as setting it to null.
---
 .../apache/roller/weblogger/business/TestTask.java |  2 +-
 .../weblogger/business/pings/PingQueueTask.java    | 52 ++++++-------
 .../business/runnable/ResetHitCountsTask.java      | 54 ++++++-------
 .../business/runnable/ScheduledEntriesTask.java    | 62 +++++++--------
 .../planet/tasks/RefreshRollerPlanetTask.java      | 54 ++++++-------
 .../weblogger/planet/tasks/SyncWebsitesTask.java   | 88 +++++++++++-----------
 6 files changed, 156 insertions(+), 156 deletions(-)

diff --git a/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java b/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java
index 1cadb31..5f06fa2 100644
--- a/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java
+++ b/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java
@@ -22,7 +22,7 @@ import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.runnable.RollerTaskWithLeasing;
 
 public class TestTask extends RollerTaskWithLeasing {
-    public static String NAME = "TestTask";
+    public static final String NAME = "TestTask";
 
     public TestTask() {}
 
diff --git a/app/src/main/java/org/apache/roller/weblogger/business/pings/PingQueueTask.java b/app/src/main/java/org/apache/roller/weblogger/business/pings/PingQueueTask.java
index ad7b13c..c4440ef 100644
--- a/app/src/main/java/org/apache/roller/weblogger/business/pings/PingQueueTask.java
+++ b/app/src/main/java/org/apache/roller/weblogger/business/pings/PingQueueTask.java
@@ -37,43 +37,43 @@ import org.apache.roller.weblogger.business.WebloggerFactory;
 public class PingQueueTask extends RollerTaskWithLeasing {
     private static Log log = LogFactory.getLog(PingQueueTask.class);
 
-    public static String NAME = "PingQueueTask";
+    public static final String NAME = "PingQueueTask";
 
     // a unique id for this specific task instance
     // this is meant to be unique for each client in a clustered environment
     private String clientId = null;
-    
+
     // a String description of when to start this task
     private String startTimeDesc = "immediate";
-    
+
     // interval at which the task is run, default is 5 minutes
     private int interval = 5;
-    
+
     // lease time given to task lock
     private int leaseTime = RollerTaskWithLeasing.DEFAULT_LEASE_MINS;
-    
-    
+
+
     public String getClientId() {
         return clientId;
     }
-    
+
     public Date getStartTime(Date currentTime) {
         return getAdjustedTime(currentTime, startTimeDesc);
     }
-    
+
     public String getStartTimeDesc() {
         return startTimeDesc;
     }
-    
+
     public int getInterval() {
         return this.interval;
     }
-    
+
     public int getLeaseTime() {
         return this.leaseTime;
     }
-    
-    
+
+
     public void init() throws WebloggerException {
         this.init(PingQueueTask.NAME);
     }
@@ -84,19 +84,19 @@ public class PingQueueTask extends RollerTaskWithLeasing {
 
         // get relevant props
         Properties props = this.getTaskProperties();
-        
+
         // extract clientId
         String client = props.getProperty("clientId");
         if(client != null) {
             this.clientId = client;
         }
-        
+
         // extract start time
         String startTimeStr = props.getProperty("startTime");
         if(startTimeStr != null) {
             this.startTimeDesc = startTimeStr;
         }
-        
+
         // extract interval
         String intervalStr = props.getProperty("interval");
         if(intervalStr != null) {
@@ -106,7 +106,7 @@ public class PingQueueTask extends RollerTaskWithLeasing {
                 log.warn("Invalid interval: "+intervalStr);
             }
         }
-        
+
         // extract lease time
         String leaseTimeStr = props.getProperty("leaseTime");
         if(leaseTimeStr != null) {
@@ -116,25 +116,25 @@ public class PingQueueTask extends RollerTaskWithLeasing {
                 log.warn("Invalid leaseTime: "+leaseTimeStr);
             }
         }
-        
+
         // initialize queue processor
         PingQueueProcessor.init();
     }
-    
+
 
     /**
      * Run the task once.
      */
     public void runTask() {
-        
+
         try {
             log.debug("task started");
-            
+
             PingQueueProcessor.getInstance().processQueue();
             WebloggerFactory.getWeblogger().flush();
-            
+
             log.debug("task completed");
-            
+
         } catch (WebloggerException e) {
             log.error("Error while processing ping queue", e);
         } catch (Exception ee) {
@@ -143,10 +143,10 @@ public class PingQueueTask extends RollerTaskWithLeasing {
             // always release
             WebloggerFactory.getWeblogger().release();
         }
-        
+
     }
-    
-    
+
+
     /**
      * Main method so that this task may be run from outside the webapp.
      */
@@ -161,5 +161,5 @@ public class PingQueueTask extends RollerTaskWithLeasing {
             System.exit(-1);
         }
     }
-    
+
 }
diff --git a/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java b/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java
index e254abd..00d8dfb 100644
--- a/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java
+++ b/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java
@@ -33,44 +33,44 @@ import org.apache.roller.weblogger.business.WeblogEntryManager;
 public class ResetHitCountsTask extends RollerTaskWithLeasing {
     private static Log log = LogFactory.getLog(ResetHitCountsTask.class);
 
-    public static String NAME = "ResetHitCountsTask";
+    public static final String NAME = "ResetHitCountsTask";
 
 
     // a unique id for this specific task instance
     // this is meant to be unique for each client in a clustered environment
     private String clientId = null;
-    
+
     // a String description of when to start this task
     private String startTimeDesc = "startOfDay";
-    
+
     // interval at which the task is run, default is 1 day
     private int interval = RollerTask.DEFAULT_INTERVAL_MINS;
-    
+
     // lease time given to task lock, default is 30 minutes
     private int leaseTime = RollerTaskWithLeasing.DEFAULT_LEASE_MINS;
-    
-    
+
+
     public String getClientId() {
         return clientId;
     }
-    
+
     public Date getStartTime(Date currentTime) {
         return getAdjustedTime(currentTime, startTimeDesc);
     }
-    
+
     public String getStartTimeDesc() {
         return startTimeDesc;
     }
-    
+
     public int getInterval() {
         return this.interval;
     }
-    
+
     public int getLeaseTime() {
         return this.leaseTime;
     }
-    
-    
+
+
     public void init() throws WebloggerException {
         this.init(ResetHitCountsTask.NAME);
     }
@@ -78,22 +78,22 @@ public class ResetHitCountsTask extends RollerTaskWithLeasing {
     @Override
     public void init(String name) throws WebloggerException {
         super.init(name);
-        
+
         // get relevant props
         Properties props = this.getTaskProperties();
-        
+
         // extract clientId
         String client = props.getProperty("clientId");
         if(client != null) {
             this.clientId = client;
         }
-        
+
         // extract start time
         String startTimeStr = props.getProperty("startTime");
         if(startTimeStr != null) {
             this.startTimeDesc = startTimeStr;
         }
-        
+
         // extract interval
         String intervalStr = props.getProperty("interval");
         if(intervalStr != null) {
@@ -103,7 +103,7 @@ public class ResetHitCountsTask extends RollerTaskWithLeasing {
                 log.warn("Invalid interval: "+intervalStr);
             }
         }
-        
+
         // extract lease time
         String leaseTimeStr = props.getProperty("leaseTime");
         if(leaseTimeStr != null) {
@@ -114,22 +114,22 @@ public class ResetHitCountsTask extends RollerTaskWithLeasing {
             }
         }
     }
-    
-    
+
+
     /**
      * Execute the task.
      */
     public void runTask() {
-        
+
         try {
             log.info("task started");
-            
+
             WeblogEntryManager mgr = WebloggerFactory.getWeblogger().getWeblogEntryManager();
             mgr.resetAllHitCounts();
             WebloggerFactory.getWeblogger().flush();
-            
+
             log.info("task completed");
-            
+
         } catch (WebloggerException e) {
             log.error("Error while resetting hit counts", e);
         } catch (Exception ee) {
@@ -138,10 +138,10 @@ public class ResetHitCountsTask extends RollerTaskWithLeasing {
             // always release
             WebloggerFactory.getWeblogger().release();
         }
-        
+
     }
-    
-    
+
+
     /**
      * Main method so that this task may be run from outside the webapp.
      */
@@ -156,5 +156,5 @@ public class ResetHitCountsTask extends RollerTaskWithLeasing {
             System.exit(-1);
         }
     }
-    
+
 }
diff --git a/app/src/main/java/org/apache/roller/weblogger/business/runnable/ScheduledEntriesTask.java b/app/src/main/java/org/apache/roller/weblogger/business/runnable/ScheduledEntriesTask.java
index 343b347..3e3ca9e 100644
--- a/app/src/main/java/org/apache/roller/weblogger/business/runnable/ScheduledEntriesTask.java
+++ b/app/src/main/java/org/apache/roller/weblogger/business/runnable/ScheduledEntriesTask.java
@@ -39,45 +39,45 @@ import org.apache.roller.weblogger.util.cache.CacheManager;
  */
 public class ScheduledEntriesTask extends RollerTaskWithLeasing {
     private static Log log = LogFactory.getLog(ScheduledEntriesTask.class);
-    
-    public static String NAME = "ScheduledEntriesTask";
 
-    
+    public static final String NAME = "ScheduledEntriesTask";
+
+
     // a unique id for this specific task instance
     // this is meant to be unique for each client in a clustered environment
     private String clientId = null;
-    
+
     // a String description of when to start this task
     private String startTimeDesc = "immediate";
-    
+
     // interval at which the task is run, default is once per minute
     private int interval = 1;
-    
+
     // lease time given to task lock, default is 30 minutes
     private int leaseTime = RollerTaskWithLeasing.DEFAULT_LEASE_MINS;
-    
+
 
     public String getClientId() {
         return clientId;
     }
-    
+
     public Date getStartTime(Date currentTime) {
         return getAdjustedTime(currentTime, startTimeDesc);
     }
-    
+
     public String getStartTimeDesc() {
         return startTimeDesc;
     }
-    
+
     public int getInterval() {
         return this.interval;
     }
-    
+
     public int getLeaseTime() {
         return this.leaseTime;
     }
-    
-    
+
+
     public void init() throws WebloggerException {
         this.init(ScheduledEntriesTask.NAME);
     }
@@ -88,19 +88,19 @@ public class ScheduledEntriesTask extends RollerTaskWithLeasing {
 
         // get relevant props
         Properties props = this.getTaskProperties();
-        
+
         // extract clientId
         String client = props.getProperty("clientId");
         if(client != null) {
             this.clientId = client;
         }
-        
+
         // extract start time
         String startTimeStr = props.getProperty("startTime");
         if(startTimeStr != null) {
             this.startTimeDesc = startTimeStr;
         }
-        
+
         // extract interval
         String intervalStr = props.getProperty("interval");
         if(intervalStr != null) {
@@ -110,7 +110,7 @@ public class ScheduledEntriesTask extends RollerTaskWithLeasing {
                 log.warn("Invalid interval: "+intervalStr);
             }
         }
-        
+
         // extract lease time
         String leaseTimeStr = props.getProperty("leaseTime");
         if(leaseTimeStr != null) {
@@ -121,30 +121,30 @@ public class ScheduledEntriesTask extends RollerTaskWithLeasing {
             }
         }
     }
-    
-    
+
+
     /**
      * Execute the task.
      */
     public void runTask() {
-        
+
         log.debug("task started");
-        
+
         try {
             WeblogEntryManager wMgr = WebloggerFactory.getWeblogger().getWeblogEntryManager();
             IndexManager searchMgr = WebloggerFactory.getWeblogger().getIndexManager();
-            
+
             Date now = new Date();
-            
+
             log.debug("looking up scheduled entries older than " + now);
-            
+
             // get all published entries older than current time
             WeblogEntrySearchCriteria wesc = new WeblogEntrySearchCriteria();
             wesc.setEndDate(now);
             wesc.setStatus(PubStatus.SCHEDULED);
             List<WeblogEntry> scheduledEntries = wMgr.getWeblogEntries(wesc);
             log.debug("promoting "+scheduledEntries.size()+" entries to PUBLISHED state");
-            
+
             for (WeblogEntry entry : scheduledEntries) {
                 entry.setStatus(PubStatus.PUBLISHED);
                 entry.setRefreshAggregates(true);
@@ -153,7 +153,7 @@ public class ScheduledEntriesTask extends RollerTaskWithLeasing {
 
             // commit the changes
             WebloggerFactory.getWeblogger().flush();
-            
+
             // take a second pass to trigger reindexing and cache invalidations
             // this is because we need the updated entries flushed first
             for (WeblogEntry entry : scheduledEntries) {
@@ -171,12 +171,12 @@ public class ScheduledEntriesTask extends RollerTaskWithLeasing {
             // always release
             WebloggerFactory.getWeblogger().release();
         }
-        
+
         log.debug("task completed");
-        
+
     }
-    
-    
+
+
     /**
      * Main method so that this task may be run from outside the webapp.
      */
@@ -191,5 +191,5 @@ public class ScheduledEntriesTask extends RollerTaskWithLeasing {
             System.exit(-1);
         }
     }
-    
+
 }
diff --git a/app/src/main/java/org/apache/roller/weblogger/planet/tasks/RefreshRollerPlanetTask.java b/app/src/main/java/org/apache/roller/weblogger/planet/tasks/RefreshRollerPlanetTask.java
index 0e98cc0..2ddbc96 100644
--- a/app/src/main/java/org/apache/roller/weblogger/planet/tasks/RefreshRollerPlanetTask.java
+++ b/app/src/main/java/org/apache/roller/weblogger/planet/tasks/RefreshRollerPlanetTask.java
@@ -40,45 +40,45 @@ import org.apache.roller.weblogger.config.WebloggerConfig;
  * - Calls Planet business layer to refresh entries
  * </pre>
  */
-public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {    
+public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {
     private static Log log = LogFactory.getLog(RefreshRollerPlanetTask.class);
-    
-    public static String NAME = "RefreshRollerPlanetTask";
-    
+
+    public static final String NAME = "RefreshRollerPlanetTask";
+
     // a unique id for this specific task instance
     // this is meant to be unique for each client in a clustered environment
     private String clientId = "unspecifiedClientId";
-    
+
     // a String description of when to start this task
     private String startTimeDesc = "immediate";
-    
+
     // interval at which the task is run, default is 60 minutes
     private int interval = 60;
-    
+
     // lease time given to task, default is 10 minutes
     private int leaseTime = 10;
 
-    
+
     public String getClientId() {
         return clientId;
     }
-    
+
     public Date getStartTime(Date currentTime) {
         return getAdjustedTime(currentTime, startTimeDesc);
     }
-    
+
     public String getStartTimeDesc() {
         return startTimeDesc;
     }
-    
+
     public int getInterval() {
         return this.interval;
     }
-    
+
     public int getLeaseTime() {
         return this.leaseTime;
     }
-    
+
     public void init() throws WebloggerException {
         this.init(RefreshRollerPlanetTask.NAME);
     }
@@ -89,19 +89,19 @@ public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {
 
         // get relevant props
         Properties props = this.getTaskProperties();
-        
+
         // extract clientId
         String client = props.getProperty("clientId");
         if(client != null) {
             this.clientId = client;
         }
-        
+
         // extract start time
         String startTimeStr = props.getProperty("startTime");
         if(startTimeStr != null) {
             this.startTimeDesc = startTimeStr;
         }
-        
+
         // extract interval
         String intervalStr = props.getProperty("interval");
         if(intervalStr != null) {
@@ -111,7 +111,7 @@ public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {
                 log.warn("Invalid interval: "+intervalStr);
             }
         }
-        
+
         // extract lease time
         String leaseTimeStr = props.getProperty("leaseTime");
         if(leaseTimeStr != null) {
@@ -122,15 +122,15 @@ public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {
             }
         }
     }
-    
-    
+
+
     public void runTask() {
         try {
             log.info("Refreshing Planet subscriptions");
-            
+
             FeedUpdater updater = new SingleThreadedFeedUpdater();
             updater.updateSubscriptions();
-            
+
         } catch (Exception e) {
             log.error("ERROR refreshing planet", e);
         } finally {
@@ -138,21 +138,21 @@ public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {
             WebloggerFactory.getWeblogger().release();
         }
     }
-    
-    
+
+
     public static void main(String[] args) throws Exception {
-        
+
         // before we can do anything we need to bootstrap the planet backend
         WebloggerStartup.prepare();
-        
+
         // we need to use our own planet provider for integration
         String guiceModule = WebloggerConfig.getProperty("planet.aggregator.guice.module");
         WebloggerProvider provider = new GuiceWebloggerProvider(guiceModule);
         WebloggerFactory.bootstrap(provider);
-                        
+
         RefreshRollerPlanetTask task = new RefreshRollerPlanetTask();
         task.init();
         task.run();
     }
-    
+
 }
diff --git a/app/src/main/java/org/apache/roller/weblogger/planet/tasks/SyncWebsitesTask.java b/app/src/main/java/org/apache/roller/weblogger/planet/tasks/SyncWebsitesTask.java
index 85f1985..4c1d30f 100644
--- a/app/src/main/java/org/apache/roller/weblogger/planet/tasks/SyncWebsitesTask.java
+++ b/app/src/main/java/org/apache/roller/weblogger/planet/tasks/SyncWebsitesTask.java
@@ -44,48 +44,48 @@ import org.apache.roller.weblogger.pojos.Weblog;
 
 /**
  * This tasks is responsible for ensuring that the planet group 'all' contains
- * a subscription for every weblogs in the Roller system. It also takes care 
+ * a subscription for every weblogs in the Roller system. It also takes care
  * of deleting subsctiptions for weblogs that no longer exist.
  */
 public class SyncWebsitesTask extends RollerTaskWithLeasing {
     private static Log log = LogFactory.getLog(SyncWebsitesTask.class);
 
-    public static String NAME = "SyncWebsitesTask";
+    public static final String NAME = "SyncWebsitesTask";
 
     // a unique id for this specific task instance
     // this is meant to be unique for each client in a clustered environment
     private String clientId = "unspecifiedClientId";
-    
+
     // a String description of when to start this task
     private String startTimeDesc = "startOfDay";
-    
+
     // interval at which the task is run, default is 1 day
     private int interval = RollerTask.DEFAULT_INTERVAL_MINS;
-    
+
     // lease time given to ping task lock, default is 30 minutes
     private int leaseTime = RollerTaskWithLeasing.DEFAULT_LEASE_MINS;
-    
+
     public String getClientId() {
         return clientId;
     }
-    
+
     public Date getStartTime(Date currentTime) {
         return getAdjustedTime(currentTime, startTimeDesc);
     }
-    
+
     public String getStartTimeDesc() {
         return startTimeDesc;
     }
-    
+
     public int getInterval() {
         return this.interval;
     }
-    
+
     public int getLeaseTime() {
         return this.leaseTime;
     }
-    
-    
+
+
     public void init() throws WebloggerException {
         this.init(RefreshRollerPlanetTask.NAME);
     }
@@ -96,19 +96,19 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
 
         // get relevant props
         Properties props = this.getTaskProperties();
-        
+
         // extract clientId
         String client = props.getProperty("clientId");
         if(client != null) {
             this.clientId = client;
         }
-        
+
         // extract start time
         String startTimeStr = props.getProperty("startTime");
         if(startTimeStr != null) {
             this.startTimeDesc = startTimeStr;
         }
-        
+
         // extract interval
         String intervalStr = props.getProperty("interval");
         if(intervalStr != null) {
@@ -118,7 +118,7 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
                 log.warn("Invalid interval: "+intervalStr);
             }
         }
-        
+
         // extract lease time
         String leaseTimeStr = props.getProperty("leaseTime");
         if(leaseTimeStr != null) {
@@ -129,18 +129,18 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
             }
         }
     }
-    
-    
+
+
     /**
      * Ensure there's a subscription in the "all" group for every Roller weblog.
      */
     public void runTask() {
-        
+
         log.info("Syncing local weblogs with planet subscriptions list");
-        
+
         try {
             PlanetManager pmgr = WebloggerFactory.getWeblogger().getPlanetManager();
-            
+
             // first, make sure there is an "all" pmgr group
             Planet planetObject = pmgr.getWebloggerById("zzz_default_planet_zzz");
             PlanetGroup group = pmgr.getGroup(planetObject, "all");
@@ -152,24 +152,24 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
                 pmgr.saveGroup(group);
                 WebloggerFactory.getWeblogger().flush();
             }
-            
+
             // walk through all enable weblogs and add/update subs as needed
             List<String> liveUserFeeds = new ArrayList<String>();
             List<Weblog> websites = WebloggerFactory.getWeblogger()
                     .getWeblogManager().getWeblogs(Boolean.TRUE, Boolean.TRUE, null, null, 0, -1);
             for ( Weblog weblog : websites ) {
-                
+
                 log.debug("processing weblog - "+weblog.getHandle());
                 String feedUrl = "weblogger:"+weblog.getHandle();
-                
+
                 // add feed url to the "live" list
                 liveUserFeeds.add(feedUrl);
-                
+
                 // if sub already exists then update it, otherwise add it
                 Subscription sub = pmgr.getSubscription(feedUrl);
                 if (sub == null) {
                     log.debug("ADDING feed: "+feedUrl);
-                    
+
                     sub = new Subscription();
                     sub.setTitle(weblog.getName());
                     sub.setFeedURL(feedUrl);
@@ -178,7 +178,7 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
                     sub.setAuthor(weblog.getName());
                     sub.setLastUpdated(new Date(0));
                     pmgr.saveSubscription(sub);
-                    
+
                     sub.getGroups().add(group);
                     group.getSubscriptions().add(sub);
 
@@ -186,30 +186,30 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
 
                 } else {
                     log.debug("UPDATING feed: "+feedUrl);
-                    
+
                     sub.setTitle(weblog.getName());
                     sub.setAuthor(weblog.getName());
-                    
+
                     pmgr.saveSubscription(sub);
                 }
-                
+
                 // save as we go
                 WebloggerFactory.getWeblogger().flush();
             }
-            
+
             // new subs added, existing subs updated, now delete old subs
             Set<Subscription> deleteSubs = new HashSet<Subscription>();
             Set<Subscription> subs = group.getSubscriptions();
             for (Subscription sub : subs) {
                 // only delete subs from the group if ...
                 // 1. they are local
-                // 2. they are no longer listed as a weblog 
-                if (sub.getFeedURL().startsWith("weblogger:") && 
+                // 2. they are no longer listed as a weblog
+                if (sub.getFeedURL().startsWith("weblogger:") &&
                         !liveUserFeeds.contains(sub.getFeedURL())) {
                     deleteSubs.add(sub);
                 }
             }
-            
+
             // now go back through deleteSubs and do actual delete
             // this is required because deleting a sub in the loop above
             // causes a ConcurrentModificationException because we can't
@@ -219,11 +219,11 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
                 pmgr.deleteSubscription(deleteSub);
                 group.getSubscriptions().remove(deleteSub);
             }
-            
+
             // all done, lets save
             pmgr.saveGroup(group);
             WebloggerFactory.getWeblogger().flush();
-            
+
         } catch (RollerException e) {
             log.error("ERROR refreshing entries", e);
         } finally {
@@ -231,24 +231,24 @@ public class SyncWebsitesTask extends RollerTaskWithLeasing {
             WebloggerFactory.getWeblogger().release();
         }
     }
-    
-    
-    /** 
-     * Task may be run from the command line 
+
+
+    /**
+     * Task may be run from the command line
      */
     public static void main(String[] args) throws Exception {
-        
+
         // before we can do anything we need to bootstrap the planet backend
         WebloggerStartup.prepare();
-        
+
         // we need to use our own planet provider for integration
         String guiceModule = WebloggerConfig.getProperty("planet.aggregator.guice.module");
         WebloggerProvider provider = new GuiceWebloggerProvider(guiceModule);
         WebloggerFactory.bootstrap(provider);
-        
+
         SyncWebsitesTask task = new SyncWebsitesTask();
         task.init();
         task.run();
     }
-    
+
 }