jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1104040 - in /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server: io/IOUtil.java remoting/davex/JcrRemotingServlet.java remoting/davex/JsonDiffHandler.java
Date Tue, 17 May 2011 07:49:01 GMT
Author: angela
Date: Tue May 17 07:49:01 2011
New Revision: 1104040

URL: http://svn.apache.org/viewvc?rev=1104040&view=rev
Log:
minor improvement

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOUtil.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonDiffHandler.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOUtil.java?rev=1104040&r1=1104039&r2=1104040&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOUtil.java
Tue May 17 07:49:01 2011
@@ -30,10 +30,15 @@ import java.io.OutputStream;
 import java.util.Date;
 
 /**
- * <code>IOUtil</code> provides utitily methods used for import and export
+ * <code>IOUtil</code> provides utility methods used for import and export
  * operations.
  */
-public class IOUtil {
+public final class IOUtil {
+
+    /**
+     * Avoid instantiation
+     */
+    private IOUtil() {}
 
     /**
      * Constant for undefined modification/creation time
@@ -124,7 +129,7 @@ public class IOUtil {
             return mimeType;
         }
         // strip any parameters
-        int semi = mimeType.indexOf(";");
+        int semi = mimeType.indexOf(';');
         return (semi > 0) ? mimeType.substring(0, semi) : mimeType;
     }
 
@@ -144,7 +149,7 @@ public class IOUtil {
         }
         String encoding = contentType.substring(equal + 8);
         // get rid of any other parameters that might be specified after the charset
-        int semi = encoding.indexOf(";");
+        int semi = encoding.indexOf(';');
         if (semi != -1) {
             encoding = encoding.substring(0, semi);
         }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java?rev=1104040&r1=1104039&r2=1104040&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
Tue May 17 07:49:01 2011
@@ -594,7 +594,7 @@ public abstract class JcrRemotingServlet
         private void extract() {
             String rp = loc.getRepositoryPath();
             rp = rp.substring(0, rp.lastIndexOf('.'));
-            int pos = rp.lastIndexOf(".");
+            int pos = rp.lastIndexOf('.');
             if (pos > -1) {
                 String depthStr = rp.substring(pos + 1);
                 try {

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonDiffHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonDiffHandler.java?rev=1104040&r1=1104039&r2=1104040&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonDiffHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonDiffHandler.java
Tue May 17 07:49:01 2011
@@ -457,7 +457,7 @@ class JsonDiffHandler implements DiffHan
     /**
      * Inner class used to parse a single value
      */
-    private class ValueHandler implements JsonHandler {
+    private final class ValueHandler implements JsonHandler {
         private Value v;
 
         public void object() throws IOException {
@@ -497,7 +497,7 @@ class JsonDiffHandler implements DiffHan
     /**
      * Inner class used to parse the values from a simple json array
      */
-    private class ValuesHandler implements JsonHandler {
+    private final class ValuesHandler implements JsonHandler {
         private List<Value> values = new ArrayList<Value>();
 
         public void object() throws IOException {
@@ -542,7 +542,7 @@ class JsonDiffHandler implements DiffHan
      * Inner class for parsing a simple json object defining a node and its
      * child nodes and/or child properties
      */
-    private class NodeHandler implements JsonHandler {
+    private final class NodeHandler implements JsonHandler {
         private Node parent;
         private String key;
 
@@ -648,7 +648,7 @@ class JsonDiffHandler implements DiffHan
         abstract void createItem(Node parent) throws RepositoryException;
     }
     
-    private class ImportNode extends ImportItem {
+    private final class ImportNode extends ImportItem {
         private String ntName;
         private String uuid;
 
@@ -707,7 +707,7 @@ class JsonDiffHandler implements DiffHan
         }
     }
 
-    private class ImportProp extends ImportItem  {
+    private final class ImportProp extends ImportItem  {
         private final Value value;
 
         private ImportProp(String name, Value v) throws IOException {
@@ -721,7 +721,7 @@ class JsonDiffHandler implements DiffHan
         }
     }
 
-    private class ImportMvProp extends ImportItem  {
+    private final class ImportMvProp extends ImportItem  {
         private List<Value> values = new ArrayList<Value>();
 
         private ImportMvProp(String name) throws IOException {



Mime
View raw message