roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1585920 - in /roller/trunk/app/src/main/java/org/apache/roller: planet/util/rome/ContentModuleImpl.java weblogger/webservices/atomprotocol/MediaCollection.java weblogger/webservices/tagdata/TagDataServlet.java
Date Wed, 09 Apr 2014 09:44:37 GMT
Author: gmazza
Date: Wed Apr  9 09:44:36 2014
New Revision: 1585920

URL: http://svn.apache.org/r1585920
Log:
Sonar/IntelliJ complaints fixed.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/planet/util/rome/ContentModuleImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/tagdata/TagDataServlet.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/util/rome/ContentModuleImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/util/rome/ContentModuleImpl.java?rev=1585920&r1=1585919&r2=1585920&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/util/rome/ContentModuleImpl.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/util/rome/ContentModuleImpl.java
Wed Apr  9 09:44:36 2014
@@ -19,16 +19,16 @@ package org.apache.roller.planet.util.ro
 import com.sun.syndication.feed.module.ModuleImpl;
 
 public class ContentModuleImpl extends ModuleImpl implements ContentModule {
-    private String _encoded;
+    private String encoded;
 
     public ContentModuleImpl() {
         super(ContentModule.class,ContentModule.URI);
     }
     public String getEncoded() {
-        return _encoded;
+        return encoded;
     }
     public void setEncoded(String encoded) {
-        _encoded = encoded;
+        this.encoded = encoded;
     }
     public Class getInterface() {
         return ContentModule.class;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java?rev=1585920&r1=1585919&r2=1585920&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
Wed Apr  9 09:44:36 2014
@@ -249,9 +249,7 @@ public class MediaCollection {
                 try {
                     start = Integer.parseInt(rawPathInfo[rawPathInfo.length - 1]);
                     pathInfo = new String[rawPathInfo.length - 1];
-                    for (int i=0; i < rawPathInfo.length - 1; i++) {
-                        pathInfo[i] = rawPathInfo[i];
-                    }
+                    System.arraycopy(rawPathInfo, 0, pathInfo, 0, rawPathInfo.length - 1);
                 } catch (Exception ingored) {}
             }
             String path = filePathFromPathInfo(pathInfo);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/tagdata/TagDataServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/tagdata/TagDataServlet.java?rev=1585920&r1=1585919&r2=1585920&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/tagdata/TagDataServlet.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/tagdata/TagDataServlet.java
Wed Apr  9 09:44:36 2014
@@ -54,7 +54,7 @@ import org.apache.roller.weblogger.util.
  */
 public class TagDataServlet extends HttpServlet {
 
-    private final int MAX = WebloggerConfig.getIntProperty("services.tagdata.max", 30);
+    private static final int MAX = WebloggerConfig.getIntProperty("services.tagdata.max",
30);
 
     
     protected void doPost(
@@ -69,9 +69,9 @@ public class TagDataServlet extends Http
             throws ServletException, IOException {
 
         String[] pathInfo = new String[0];
-        boolean siteWide = true;
-        String handle = null;
-        String prefix = null;
+        boolean siteWide;
+        String handle;
+        String prefix;
         String format = "json";
         int page = 0;
         
@@ -100,8 +100,8 @@ public class TagDataServlet extends Http
         } catch (Exception ignored) {}
 
         Weblogger roller = WebloggerFactory.getWeblogger();
-        List<TagStat> tags = null;
-        Weblog weblog = null;
+        List<TagStat> tags;
+        Weblog weblog;
         try {
             WeblogManager wmgr = roller.getWeblogManager();
             WeblogEntryManager emgr = roller.getWeblogEntryManager();



Mime
View raw message