jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1104069 - in /jackrabbit/trunk: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/ jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/
Date Tue, 17 May 2011 09:00:41 GMT
Author: angela
Date: Tue May 17 09:00:40 2011
New Revision: 1104069

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

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DefaultItemFilter.java
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java?rev=1104069&r1=1104068&r2=1104069&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DavSessionProviderImpl.java
Tue May 17 09:00:40 2011
@@ -96,10 +96,10 @@ public class DavSessionProviderImpl impl
             // which seems not appropriate here
             throw new JcrDavException(e, DavServletResponse.SC_NOT_FOUND);
         } catch (RepositoryException e) {
-	    throw new JcrDavException(e);
-	} catch (ServletException e) {
-	    throw new DavException(DavServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
-	}
+            throw new JcrDavException(e);
+        } catch (ServletException e) {
+            throw new DavException(DavServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
+        }
     }
 
     /**
@@ -121,9 +121,7 @@ public class DavSessionProviderImpl impl
             }
             sesProvider.releaseSession(repSession);
             log.debug("Releasing session '"+ ds + "' from request '" + request + "'");
-        } else {
-            // session is null. nothing to be done.
-        }
+        } // else : session is null. nothing to be done.
         request.setDavSession(null);
     }
 }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DefaultItemFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DefaultItemFilter.java?rev=1104069&r1=1104068&r2=1104069&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DefaultItemFilter.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/simple/DefaultItemFilter.java
Tue May 17 09:00:40 2011
@@ -102,7 +102,7 @@ public class DefaultItemFilter implement
         if (prefixFilter.isEmpty() && uriFilter.isEmpty()) {
             return false;
         }
-        int pos = name.indexOf(":");
+        int pos = name.indexOf(':');
         if (pos < 0) {
             // no namespace info present
             return false;

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java?rev=1104069&r1=1104068&r2=1104069&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
Tue May 17 09:00:40 2011
@@ -34,8 +34,6 @@ import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
@@ -627,8 +625,7 @@ public class DomUtil {
      */
     public static Element timeoutToXml(long timeout, Document factory) {
         String expString = "Second-"+ timeout/1000;
-        Element exp = createElement(factory, DavConstants.XML_TIMEOUT, DavConstants.NAMESPACE,
expString);
-        return exp;
+        return createElement(factory, DavConstants.XML_TIMEOUT, DavConstants.NAMESPACE, expString);
     }
 
     /**
@@ -650,8 +647,7 @@ public class DomUtil {
      * @return 'deep' XML element
      */
     public static Element depthToXml(String depth, Document factory) {
-        Element dElem = createElement(factory, DavConstants.XML_DEPTH, DavConstants.NAMESPACE,
depth);
-        return dElem;
+        return createElement(factory, DavConstants.XML_DEPTH, DavConstants.NAMESPACE, depth);
     }
 
     /**
@@ -764,17 +760,4 @@ public class DomUtil {
         Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
         transformer.transform(new DOMSource(xmlDoc), ResultHelper.getResult(new StreamResult(out)));
     }
-
-    /**
-     * Uses a new Transformer instance to transform the given source to the
-     * specified result.
-     *
-     * @param source the transformation source.
-     * @param result the transformation result.
-     * @throws TransformerException
-     */
-    private static void transformDocument(Source source, Result result) throws TransformerException
{
-        Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
-        transformer.transform(source, result);
-    }
 }



Mime
View raw message