jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1800752 - in /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server: io/ remoting/davex/ util/
Date Tue, 04 Jul 2017 10:53:13 GMT
Author: reschke
Date: Tue Jul  4 10:53:13 2017
New Revision: 1800752

URL: http://svn.apache.org/viewvc?rev=1800752&view=rev
Log:
JCR-4157: jackrabbit-jcr-server: code cleanup

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveContextImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveManagerImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DirListingExportHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContext.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContextImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOContext.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOListener.java
    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/io/ImportContext.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManager.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManagerImpl.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHistoryHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/DiffParser.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
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveConfig.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveManager.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/HttpMultipartPost.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/RequestData.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveContextImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveContextImpl.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveContextImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveContextImpl.java Tue Jul  4 10:53:13 2017
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.server.io;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Workspace;
@@ -28,11 +25,6 @@ import javax.jcr.Workspace;
  */
 public class CopyMoveContextImpl implements CopyMoveContext {
 
-    /**
-     * logger instance
-     */
-    private static final Logger log = LoggerFactory.getLogger(CopyMoveContextImpl.class);
-
     private final boolean isShallow;
     private final Session session;
 

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveManagerImpl.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/CopyMoveManagerImpl.java Tue Jul  4 10:53:13 2017
@@ -16,21 +16,17 @@
  */
 package org.apache.jackrabbit.server.io;
 
-import org.apache.jackrabbit.webdav.DavException;
-import org.apache.jackrabbit.webdav.DavResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.DavResource;
+
 /**
  * <code>CopyMoveManagerImpl</code>...
  */
 public class CopyMoveManagerImpl implements CopyMoveManager {
 
-    private static Logger log = LoggerFactory.getLogger(CopyMoveManagerImpl.class);
-
     private static CopyMoveManager DEFAULT_MANAGER;
 
     private final List<CopyMoveHandler> copyMoveHandlers = new ArrayList<CopyMoveHandler>();

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java Tue Jul  4 10:53:13 2017
@@ -118,11 +118,6 @@ public class DefaultHandler implements I
     /**
      * Creates a new <code>DefaultHandler</code>. Please note that the specified
      * nodetypes must match the definitions of the defaults.
-     *
-     * @param ioManager
-     * @param collectionNodetype
-     * @param defaultNodetype
-     * @param contentNodetype
      */
     public DefaultHandler(IOManager ioManager, String collectionNodetype, String defaultNodetype, String contentNodetype) {
         this.ioManager = ioManager;
@@ -218,12 +213,6 @@ public class DefaultHandler implements I
     /**
      * Imports the data present on the import context to the specified content
      * node.
-     *
-     * @param context
-     * @param isCollection
-     * @param contentNode
-     * @return
-     * @throws IOException
      */
     protected boolean importData(ImportContext context, boolean isCollection, Node contentNode) throws IOException, RepositoryException {
         InputStream in = context.getInputStream();
@@ -246,11 +235,6 @@ public class DefaultHandler implements I
     /**
      * Imports the properties present on the specified context to the content
      * node.
-     *
-     * @param context
-     * @param isCollection
-     * @param contentNode
-     * @return
      */
     protected boolean importProperties(ImportContext context, boolean isCollection, Node contentNode) {
         try {
@@ -280,15 +264,11 @@ public class DefaultHandler implements I
     /**
      * Retrieves/creates the node that will be used to import properties and
      * data. In case of a non-collection this includes and additional content node
-     * to be created beside the 'file' node.<br>
+     * to be created beside the 'file' node.
+     * <p>
      * Please note: If the jcr:content node already exists and contains child
      * nodes, those will be removed in order to make sure, that the import
      * really replaces the existing content of the file-node.
-     *
-     * @param context
-     * @param isCollection
-     * @return
-     * @throws RepositoryException
      */
     protected Node getContentNode(ImportContext context, boolean isCollection) throws RepositoryException {
         Node parentNode = (Node)context.getImportRoot();

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultIOManager.java Tue Jul  4 10:53:13 2017
@@ -16,16 +16,11 @@
  */
 package org.apache.jackrabbit.server.io;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  * <code>DefaultIOManager</code>...
  */
 public class DefaultIOManager extends IOManagerImpl {
 
-    private static Logger log = LoggerFactory.getLogger(DefaultIOManager.class);
-
     /**
      * Creates a new <code>DefaultIOManager</code> and populates the internal
      * list of <code>IOHandler</code>s by the defaults.

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DirListingExportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DirListingExportHandler.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DirListingExportHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DirListingExportHandler.java Tue Jul  4 10:53:13 2017
@@ -36,7 +36,8 @@ import java.util.Map;
 
 /**
  * <code>DirListingExportHandler</code> represents a simple export for collections:
- * a human-readable view listing the members.<br>
+ * a human-readable view listing the members.
+ * <p>
  * Note: If {@link #exportContent(ExportContext, boolean)} is called the view list
  * child nodes only, without respecting their representation as <code>DavResource</code>s.
  */

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContext.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContext.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContext.java Tue Jul  4 10:53:13 2017
@@ -27,8 +27,6 @@ public interface ExportContext extends I
 
     /**
      * Returns the item to be exported
-     *
-     * @return
      */
     public Item getExportRoot();
 
@@ -41,16 +39,11 @@ public interface ExportContext extends I
 
     /**
      * Set the content type for the resource content
-     *
-     * @param mimeType
-     * @param encoding
      */
     public void setContentType(String mimeType, String encoding);
 
     /**
      * Sets the content language.
-     *
-     * @param contentLanguage
      */
     public void setContentLanguage(String contentLanguage);
 
@@ -86,9 +79,6 @@ public interface ExportContext extends I
 
     /**
      * Sets an arbitrary property to this export context.
-     *
-     * @param propertyName
-     * @param propertyValue
      */
     public void setProperty(Object propertyName, Object propertyValue);
 }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContextImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContextImpl.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContextImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ExportContextImpl.java Tue Jul  4 10:53:13 2017
@@ -113,7 +113,6 @@ public class ExportContextImpl extends A
      * Does nothing since the wrapped output context does not understand
      * creation time
      *
-     * @param creationTime
      * @see ExportContext#setCreationTime(long)
      */
     public void setCreationTime(long creationTime) {
@@ -151,7 +150,6 @@ public class ExportContextImpl extends A
      * If success is true, the properties set before an the output stream are
      * written to the wrapped <code>OutputContext</code>.
      *
-     * @param success
      * @see ExportContext#informCompleted(boolean)
      */
     @Override

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOContext.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOContext.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOContext.java Tue Jul  4 10:53:13 2017
@@ -24,8 +24,6 @@ public interface IOContext {
 
     /**
      * Returns the IOListener.
-     *
-     * @return
      */
     public IOListener getIOListener();
 
@@ -36,9 +34,7 @@ public interface IOContext {
 
     /**
      * Informs this context that it will not be used for further exports any
-     * more. A boolean flag indicates about the success of the export
-     *
-     * @param success
+     * more. A boolean flag indicates about the success of the export.
      */
     public void informCompleted(boolean success);
 

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOHandler.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOHandler.java Tue Jul  4 10:53:13 2017
@@ -30,8 +30,6 @@ public interface IOHandler {
 
     /**
      * Returns the <code>IOManager</code> that called this handler or <code>null</code>.
-     *
-     * @return
      */
     public IOManager getIOManager();
 
@@ -41,19 +39,13 @@ public interface IOHandler {
     public void setIOManager(IOManager ioManager);
 
     /**
-     * Returns a human readable name for this <code>IOHandler</code>
-     *
-     * @return
+     * Returns a human readable name for this <code>IOHandler</code>.
      */
     public String getName();
 
     /**
      * Returns true, if this handler can run a successful import based on the
      * specified context.
-     *
-     * @param context
-     * @param isCollection
-     * @return
      */
     public boolean canImport(ImportContext context, boolean isCollection);
 
@@ -63,10 +55,6 @@ public interface IOHandler {
      * to return the same as {@link IOHandler#canImport(ImportContext, boolean)}
      * where the isCollection flag is determined by
      * {@link DavResource#isCollection()}.
-     *
-     * @param context
-     * @param resource
-     * @return
      */
     public boolean canImport(ImportContext context, DavResource resource);
 
@@ -75,8 +63,8 @@ public interface IOHandler {
      * value, if the import could be completed successfully. If the specified
      * <code>ImportContext</code> does not provide a {@link ImportContext#hasStream() stream}
      * the implementation is free, to only import properties of to refuse the
-     * import.<br>
-     *
+     * import.
+     * <p>
      * Please note, that it is the responsibility of the specified
      * <code>ImportContext</code> to assert, that its stream is not consumed
      * multiple times when being passed to a chain of <code>IOHandler</code>s.
@@ -97,8 +85,8 @@ public interface IOHandler {
      * the implementation is free, to only import properties of to refuse the
      * import. A simple implementation may return the same as
      * {@link IOHandler#importContent(ImportContext, boolean)} where the
-     * isCollection flag is determined by {@link DavResource#isCollection()}<br>
-     *
+     * isCollection flag is determined by {@link DavResource#isCollection()}
+     * <p>
      * Please note, that it is the responsibility of the specified
      * <code>ImportContext</code> to assert, that its stream is not consumed
      * multiple times when being passed to a chain of <code>IOHandler</code>s.
@@ -116,10 +104,6 @@ public interface IOHandler {
     /**
      * Returns true, if this handler can run a successful export based on the
      * specified context.
-     *
-     * @param context
-     * @param isCollection
-     * @return
      */
     public boolean canExport(ExportContext context, boolean isCollection);
 
@@ -129,10 +113,6 @@ public interface IOHandler {
      * to return the same as {@link IOHandler#canExport(ExportContext, boolean)}
      * where the isCollection flag is determined by
      * {@link DavResource#isCollection()}.
-     *
-     * @param context
-     * @param resource
-     * @return
      */
     public boolean canExport(ExportContext context, DavResource resource);
 
@@ -143,8 +123,8 @@ public interface IOHandler {
      * the implementation should set the properties only and ignore the content to
      * be exported. A simple implementation may return the same as
      * {@link IOHandler#exportContent(ExportContext, boolean)} where the
-     * isCollection flag is determined by {@link DavResource#isCollection()}<br>
-     *
+     * isCollection flag is determined by {@link DavResource#isCollection()}
+     * <p>
      * Please note, that it is the responsibility of the specified
      * <code>ExportContext</code> to assert, that its stream is not written
      * multiple times when being passed to a chain of <code>IOHandler</code>s.
@@ -165,8 +145,8 @@ public interface IOHandler {
      * the implementation should set the properties only and ignore the content to
      * be exported. A simple implementation may return the same as
      * {@link IOHandler#exportContent(ExportContext, boolean)} where the
-     * isCollection flag is determined by {@link DavResource#isCollection()}<br>
-     *
+     * isCollection flag is determined by {@link DavResource#isCollection()}
+     * <p>
      * Please note, that it is the responsibility of the specified
      * <code>ExportContext</code> to assert, that its stream is not written
      * multiple times when being passed to a chain of <code>IOHandler</code>s.

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOListener.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOListener.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/IOListener.java Tue Jul  4 10:53:13 2017
@@ -22,30 +22,19 @@ package org.apache.jackrabbit.server.io;
 public interface IOListener {
 
     /**
-     * The import/export context has been passed to the given <code>IOHandler</code>
-     *
-     * @param handler
-     * @param context
+     * The import/export context has been passed to the given <code>IOHandler</code>.
      */
     public void onBegin(IOHandler handler, IOContext context);
 
     /**
      * The specified <code>IOHandler</code> finished. A boolean flag indicates
      * whether the handler was able to run the import/export.
-     *
-     * @param handler
-     * @param context
-     * @param success
      */
     public void onEnd(IOHandler handler, IOContext context, boolean success);
 
     /**
      * An exception occurred during import/export within the specified
      * <code>IOHandler</code>.
-     *
-     * @param ioHandler
-     * @param context
-     * @param e
      */
     public void onError(IOHandler ioHandler, IOContext context, Exception e);
 }

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=1800752&r1=1800751&r2=1800752&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 Jul  4 10:53:13 2017
@@ -77,10 +77,6 @@ public final class IOUtil {
     }
 
     /**
-     *
-     * @param in
-     * @param out
-     * @throws IOException
      */
     public static void spool(InputStream in, OutputStream out) throws IOException {
         try {
@@ -157,7 +153,8 @@ public final class IOUtil {
     }
 
     /**
-     * Builds a new temp. file from the given input stream.<br>
+     * Builds a new temp. file from the given input stream.
+     * <p>
      * It is left to the user to remove the file as soon as it is not used
      * any more.
      *

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContext.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContext.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContext.java Tue Jul  4 10:53:13 2017
@@ -91,9 +91,6 @@ public interface ImportContext extends I
     public String getEncoding();
 
     /**
-     *
-     * @param propertyName
-     * @return
      */
     public Object getProperty(Object propertyName);
 }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManager.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManager.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManager.java Tue Jul  4 10:53:13 2017
@@ -27,32 +27,18 @@ import java.util.Map;
 public interface PropertyManager {
 
     /**
-     *
-     * @param exportContext
-     * @param isCollection
-     * @return
-     * @throws RepositoryException
      */
     public boolean exportProperties(PropertyExportContext exportContext, boolean isCollection) throws RepositoryException;
 
     /**
-     *
-     * @param importContext
-     * @param isCollection
-     * @return
-     * @throws RepositoryException
      */
     public Map<? extends PropEntry, ?> alterProperties(PropertyImportContext importContext, boolean isCollection) throws RepositoryException;
 
     /**
-     *
-     * @param propertyHandler
      */
     public void addPropertyHandler(PropertyHandler propertyHandler);
 
     /**
-     *
-     * @return
      */
     public PropertyHandler[] getPropertyHandlers();
 }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManagerImpl.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/PropertyManagerImpl.java Tue Jul  4 10:53:13 2017
@@ -16,22 +16,19 @@
  */
 package org.apache.jackrabbit.server.io;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.jackrabbit.webdav.property.PropEntry;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 import javax.jcr.RepositoryException;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
+
+import org.apache.jackrabbit.webdav.property.PropEntry;
 
 /**
  * <code>PropertyManagerImpl</code>...
  */
 public class PropertyManagerImpl implements PropertyManager {
 
-    private static Logger log = LoggerFactory.getLogger(PropertyManagerImpl.class);
-
     private static PropertyManager DEFAULT_MANAGER;
 
     private final List<PropertyHandler> propertyHandlers = new ArrayList<PropertyHandler>();

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHandler.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHandler.java Tue Jul  4 10:53:13 2017
@@ -25,13 +25,9 @@ import javax.jcr.version.Version;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.webdav.DavResource;
 import org.apache.jackrabbit.webdav.property.PropEntry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class VersionHandler extends DefaultHandler implements IOHandler{
 
-    private static Logger log = LoggerFactory.getLogger(VersionHandler.class);
-
     public VersionHandler() {
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHistoryHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHistoryHandler.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHistoryHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/VersionHistoryHandler.java Tue Jul  4 10:53:13 2017
@@ -16,24 +16,21 @@
  */
 package org.apache.jackrabbit.server.io;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.jackrabbit.webdav.DavResource;
-import org.apache.jackrabbit.webdav.property.PropEntry;
-
-import javax.jcr.version.VersionHistory;
-import javax.jcr.RepositoryException;
-import javax.jcr.Item;
 import java.io.IOException;
 import java.util.Map;
 
+import javax.jcr.Item;
+import javax.jcr.RepositoryException;
+import javax.jcr.version.VersionHistory;
+
+import org.apache.jackrabbit.webdav.DavResource;
+import org.apache.jackrabbit.webdav.property.PropEntry;
+
 /**
  * <code>VersionHistoryHandler</code>...
  */
 public class VersionHistoryHandler implements IOHandler, PropertyHandler {
 
-    private static Logger log = LoggerFactory.getLogger(VersionHistoryHandler.class);
-
     private IOManager ioManager;
 
     public VersionHistoryHandler() {

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/XmlHandler.java Tue Jul  4 10:53:13 2017
@@ -16,34 +16,32 @@
  */
 package org.apache.jackrabbit.server.io;
 
-import org.apache.jackrabbit.JcrConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.jcr.ImportUUIDBehavior;
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.HashSet;
 import java.util.Set;
 
+import javax.jcr.ImportUUIDBehavior;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.jackrabbit.JcrConstants;
+
 /**
  * <code>XmlHandler</code> imports xml files and exports nodes that have
  * the proper {@link #XML_MIMETYPE} defined with their content. The export is
  * performed by running a {@link Session#exportDocumentView(String, OutputStream, boolean, boolean)
  * document view export} for the content of the export root defined with the
- * specified {@link ExportContext}.<br>
+ * specified {@link ExportContext}.
+ * <p>
  * Please note that this handler is not suited for a generic system or document
  * view import/export of {@link Node}s because an extra root node is always
  * created during import and expected during export, respectively.
  */
 public class XmlHandler extends DefaultHandler {
 
-    private static Logger log = LoggerFactory.getLogger(XmlHandler.class);
-
     /**
      * the xml mimetype
      */

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/DiffParser.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/DiffParser.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/DiffParser.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/DiffParser.java Tue Jul  4 10:53:13 2017
@@ -55,33 +55,14 @@ class DiffParser {
         this.handler = handler;
     }
 
-    /**
-     *
-     * @param str
-     * @throws IOException
-     * @throws DiffException
-     */
     public void parse(String str) throws IOException, DiffException {
         parse(new BufferedReader(new StringReader(str)));
     }
 
-    /**
-     *
-     * @param input
-     * @param charSetName
-     * @throws IOException
-     * @throws DiffException
-     */
     public void parse(InputStream input, String charSetName) throws IOException, DiffException {
         parse(new BufferedReader(new InputStreamReader(input, charSetName)));
     }
 
-    /**
-     *
-     * @param reader
-     * @throws IOException
-     * @throws DiffException
-     */
     public void parse(Reader reader) throws IOException, DiffException {
         int action = -1;
         String path = null;

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=1800752&r1=1800751&r2=1800752&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 Jul  4 10:53:13 2017
@@ -572,12 +572,6 @@ public abstract class JcrRemotingServlet
     /**
      * TODO: doesn't work properly with intermediate SNS-nodes
      * TODO: doesn't respect jcr:uuid properties.
-     *
-     * @param session
-     * @param targetPath
-     * @param data
-     * @throws RepositoryException
-     * @throws DiffException
      */
     private static String modifyContent(Session session, String targetPath, RequestData data, ProtectedRemoveManager protectedRemoveManager)
             throws RepositoryException, DiffException {
@@ -614,13 +608,6 @@ public abstract class JcrRemotingServlet
         return null; // TODO build loc-href if items were created.
     }
 
-    /**
-     * 
-     * @param session
-     * @param nodePath
-     * @param data
-     * @throws RepositoryException
-     */
     private static void createNode(Session session, String nodePath, RequestData data) throws RepositoryException {
         Node parent = session.getRootNode();
         String[] smgts = Text.explode(nodePath, '/');
@@ -642,12 +629,6 @@ public abstract class JcrRemotingServlet
         }
     }
 
-    /**
-     *
-     * @param request
-     * @return
-     * @throws DavException
-     */
     private static Session getRepositorySession(WebdavRequest request) throws DavException {
         DavSession ds = request.getDavSession();
         return JcrDavSession.getRepositorySession(ds);

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=1800752&r1=1800751&r2=1800752&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 Jul  4 10:53:13 2017
@@ -183,7 +183,7 @@ class JsonDiffHandler implements DiffHan
         try {
             String itemPath = getItemPath(targetPath);
             Item item = session.getItem(itemPath);
-            
+
             ItemDefinition def = (item.isNode()) ? ((Node) item).getDefinition() : ((Property) item).getDefinition();
             if (def.isProtected()) {
                 // delegate to the manager.
@@ -490,8 +490,8 @@ class JsonDiffHandler implements DiffHan
     private Value[] extractValues(String diffValue) throws RepositoryException, DiffException, IOException {
         ValuesHandler hndlr = new ValuesHandler();
         // surround diff value { key : } to make it parsable
-        new JsonParser(hndlr).parse("{\"a\":"+diffValue+"}");
-        
+        new JsonParser(hndlr).parse("{\"a\":" + diffValue + "}");
+
         return hndlr.getValues();
     }
 
@@ -615,23 +615,23 @@ class JsonDiffHandler implements DiffHan
 
         @Override
         public void object() throws IOException {
-        	ImportNode n;
-        	if (st.isEmpty()) {
-        		try {
-            		n = new ImportNode(parent.getPath(), key);        			
-        		} catch (RepositoryException e) {
-        			throw new DiffException(e.getMessage(), e);
-        		}
-
-        	} else {
-        		ImportItem obj = st.peek();
-                n = new ImportNode(obj.getPath(), key);                                                    
-                if (obj instanceof ImportNode) {                        
-                	((ImportNode) obj).addNode(n);                    
-                } else {                
-                	throw new DiffException("Invalid DIFF format: The JSONArray may only contain simple values.");                    
-                }        		
-        	}
+            ImportNode n;
+            if (st.isEmpty()) {
+                try {
+                    n = new ImportNode(parent.getPath(), key);
+                } catch (RepositoryException e) {
+                    throw new DiffException(e.getMessage(), e);
+                }
+
+            } else {
+                ImportItem obj = st.peek();
+                n = new ImportNode(obj.getPath(), key);
+                if (obj instanceof ImportNode) {
+                    ((ImportNode) obj).addNode(n);
+                } else {
+                    throw new DiffException("Invalid DIFF format: The JSONArray may only contain simple values.");
+                }
+            }
             st.push(n);
         }
 
@@ -709,7 +709,7 @@ class JsonDiffHandler implements DiffHan
         public void value(double value) throws IOException {
             value(vf.createValue(value));
         }
-                
+
         private void value(Value v) throws IOException {
             ImportItem obj = st.peek();
             if (obj instanceof ImportMvProp) {
@@ -727,7 +727,7 @@ class JsonDiffHandler implements DiffHan
         final String parentPath;
         final String name;
         final String path;
-        
+
         private ImportItem(String parentPath, String name) throws IOException {
             if (name == null) {
                 throw new DiffException("Invalid DIFF format: NULL key.");
@@ -736,15 +736,15 @@ class JsonDiffHandler implements DiffHan
             this.parentPath = parentPath;
             this.path = parentPath+"/"+name;
         }
-        
+
         void setNameAttribute(AttributesImpl attr) {
             attr.addAttribute(Name.NS_SV_URI, "name", Name.NS_SV_PREFIX +":name", TYPE_CDATA, name);
         }
 
         String getPath() {
-        	return path;
+            return path;
         }
-        
+
         abstract boolean mandatesImport(Node parent);
 
         abstract void createItem(Node parent) throws RepositoryException, IOException;
@@ -830,8 +830,8 @@ class JsonDiffHandler implements DiffHan
 
         void addNode(ImportNode node) {
             childN.add(node);
-        }        
-        
+        }
+
         @Override
         void importItem(ContentHandler contentHandler) throws IOException {
             try {
@@ -946,12 +946,12 @@ class JsonDiffHandler implements DiffHan
             super(parentPath, name);
             try {
                 if (value == null) {
-            		this.value = extractValuesFromRequest(getPath())[0];
-            	} else {
-            		this.value = value;
-            	}                        	
+                    this.value = extractValuesFromRequest(getPath())[0];
+                } else {
+                    this.value = value;
+                }
             } catch (RepositoryException e) {
-            	throw new DiffException(e.getMessage(), e);
+                throw new DiffException(e.getMessage(), e);
             }
         }
 
@@ -962,12 +962,12 @@ class JsonDiffHandler implements DiffHan
 
         @Override
         void startValueElement(ContentHandler contentHandler) throws IOException {
-            try {            	
+            try {
                 String str = value.getString();
-                contentHandler.startElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX+":"+VALUE, new AttributesImpl());
+                contentHandler.startElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX + ":" + VALUE, new AttributesImpl());
                 contentHandler.characters(str.toCharArray(), 0, str.length());
-                contentHandler.endElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX+":"+VALUE);
-            } catch(SAXException e) {
+                contentHandler.endElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX + ":" + VALUE);
+            } catch (SAXException e) {
                 throw new DiffException(e.getMessage());
             } catch (ValueFormatException e) {
                 throw new DiffException(e.getMessage());
@@ -998,18 +998,19 @@ class JsonDiffHandler implements DiffHan
         @Override
         void startValueElement(ContentHandler contentHandler) throws IOException {
             try {
-            	// Multi-valued property with values present in the request multi-part             	
-            	if (values.size() == 0) {            	
-            		values = Arrays.asList(extractValuesFromRequest(getPath()));            	   
-            	}
-            	
+                // Multi-valued property with values present in the request
+                // multi-part
+                if (values.size() == 0) {
+                    values = Arrays.asList(extractValuesFromRequest(getPath()));
+                }
+
                 for (Value v : values) {
                     String str = v.getString();
-                    contentHandler.startElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX+":"+VALUE, new AttributesImpl());
+                    contentHandler.startElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX + ":" + VALUE, new AttributesImpl());
                     contentHandler.characters(str.toCharArray(), 0, str.length());
-                    contentHandler.endElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX+":"+VALUE);
+                    contentHandler.endElement(Name.NS_SV_URI, VALUE, Name.NS_SV_PREFIX + ":" + VALUE);
                 }
-            } catch(SAXException e) {
+            } catch (SAXException e) {
                 throw new DiffException(e.getMessage());
             } catch (ValueFormatException e) {
                 throw new DiffException(e.getMessage());

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JsonWriter.java Tue Jul  4 10:53:13 2017
@@ -58,13 +58,6 @@ class JsonWriter {
         this.writer = writer;
     }
 
-    /**
-     * 
-     * @param node
-     * @param maxLevels
-     * @throws RepositoryException
-     * @throws IOException
-     */
     void write(Node node, int maxLevels) throws RepositoryException, IOException {
         write(node, 0, maxLevels);
     }
@@ -267,21 +260,11 @@ class JsonWriter {
         writer.write(']');
     }
 
-    /**
-     *
-     * @param key
-     * @throws IOException
-     */
    private void writeKey(String key) throws IOException {
         writer.write(JsonUtil.getJsonString(key));
         writer.write(':');
     }
 
-    /**
-     * @param v
-     * @throws RepositoryException
-     * @throws IOException
-     */
     private void writeJsonValue(Value v) throws RepositoryException, IOException {
 
         switch (v.getType()) {

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveConfig.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveConfig.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveConfig.java Tue Jul  4 10:53:13 2017
@@ -35,49 +35,49 @@ import org.xml.sax.SAXException;
  */
 class ProtectedRemoveConfig {
 
-	private static final Logger log = LoggerFactory.getLogger(ProtectedRemoveConfig.class);
+    private static final Logger log = LoggerFactory.getLogger(ProtectedRemoveConfig.class);
 
-	private static final String ELEMENT_HANDLER = "protecteditemremovehandler";
-	private static final String ELEMENT_CLASS = "class";
-	private static final String ATTRIBUTE_NAME = "name";
-
-	private final ProtectedRemoveManager manager;
-
-	ProtectedRemoveConfig(ProtectedRemoveManager manager) {
-		this.manager = manager;
-	}
-
-	void parse(InputStream inputStream) throws IOException {
-		Element config;
-		ProtectedItemRemoveHandler instance = null;
-		try {
-			config = DomUtil.parseDocument(inputStream).getDocumentElement();
-			if (config == null) {
-				log.warn("Missing mandatory config element");
-				return;
-			}
-			ElementIterator handlers = DomUtil.getChildren(config, ELEMENT_HANDLER, null);
-			while (handlers.hasNext()) {
-				Element handler = handlers.nextElement();
-				instance = createHandler(handler);
-				manager.addHandler(instance);
-			}
-		} catch (ParserConfigurationException e) {
-			log.error(e.getMessage(), e);
-		} catch (SAXException e) {
-			log.error(e.getMessage(), e);
-		}
-	}
-
-	private ProtectedItemRemoveHandler createHandler(Element parent) {
-		ProtectedItemRemoveHandler instance = null;
-		Element classElem = DomUtil.getChildElement(parent, ELEMENT_CLASS, null);
-		if (classElem != null) {
-			String className = DomUtil.getAttribute(classElem, ATTRIBUTE_NAME, null);
-			if (className != null) {
-				instance = manager.createHandler(className);
-			}
-		}
-		return instance;
-	}
+    private static final String ELEMENT_HANDLER = "protecteditemremovehandler";
+    private static final String ELEMENT_CLASS = "class";
+    private static final String ATTRIBUTE_NAME = "name";
+
+    private final ProtectedRemoveManager manager;
+
+    ProtectedRemoveConfig(ProtectedRemoveManager manager) {
+        this.manager = manager;
+    }
+
+    void parse(InputStream inputStream) throws IOException {
+        Element config;
+        ProtectedItemRemoveHandler instance = null;
+        try {
+            config = DomUtil.parseDocument(inputStream).getDocumentElement();
+            if (config == null) {
+                log.warn("Missing mandatory config element");
+                return;
+            }
+            ElementIterator handlers = DomUtil.getChildren(config, ELEMENT_HANDLER, null);
+            while (handlers.hasNext()) {
+                Element handler = handlers.nextElement();
+                instance = createHandler(handler);
+                manager.addHandler(instance);
+            }
+        } catch (ParserConfigurationException e) {
+            log.error(e.getMessage(), e);
+        } catch (SAXException e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    private ProtectedItemRemoveHandler createHandler(Element parent) {
+        ProtectedItemRemoveHandler instance = null;
+        Element classElem = DomUtil.getChildElement(parent, ELEMENT_CLASS, null);
+        if (classElem != null) {
+            String className = DomUtil.getAttribute(classElem, ATTRIBUTE_NAME, null);
+            if (className != null) {
+                instance = manager.createHandler(className);
+            }
+        }
+        return instance;
+    }
 }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveManager.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveManager.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ProtectedRemoveManager.java Tue Jul  4 10:53:13 2017
@@ -42,27 +42,27 @@ class ProtectedRemoveManager {
 
     ProtectedRemoveManager(String config) throws IOException {
 
-    	 if (config == null) {
-             log.warn("protectedhandlers-config is missing -> DIFF processing can fail for the Remove operation if the content to" +
-                     "remove is protected!");
-         } else {
-        	 File file = new File(config);
-        	 if (file.exists()) {         
- 				try {
+        if (config == null) {
+            log.warn("protectedhandlers-config is missing -> DIFF processing can fail for the Remove operation if the content to"
+                    + "remove is protected!");
+        } else {
+            File file = new File(config);
+            if (file.exists()) {
+                try {
                     InputStream fis = new FileInputStream(file);
                     load(fis);
- 				} catch (FileNotFoundException e) {
- 					throw new IOException(e.getMessage(), e);
- 				}            
-        	 } else { // config is an Impl class
-        		 if (!config.isEmpty()) {        	    	
-        			 ProtectedItemRemoveHandler handler = createHandler(config); 					
-        			 addHandler(handler);        	    	
-        		 } else {        	    
-        			 log.debug("Fail to locate the protected-item-remove-handler properties file.");        	    	
-        		 }
-        	 }        
-         }    	 
+                } catch (FileNotFoundException e) {
+                    throw new IOException(e.getMessage(), e);
+                }
+            } else { // config is an Impl class
+                if (!config.isEmpty()) {
+                    ProtectedItemRemoveHandler handler = createHandler(config);
+                    addHandler(handler);
+                } else {
+                    log.debug("Fail to locate the protected-item-remove-handler properties file.");
+                }
+            }
+        }
     }
 
     void load(InputStream fis) throws IOException {
@@ -86,14 +86,14 @@ class ProtectedRemoveManager {
      * @throws RepositoryException
      */
     ProtectedItemRemoveHandler createHandler(String className) {
-    	ProtectedItemRemoveHandler irHandler = null;
+        ProtectedItemRemoveHandler irHandler = null;
         try {
-        	if (!className.isEmpty()) {
-				Class<?> irHandlerClass = Class.forName(className);
-				if (ProtectedItemRemoveHandler.class.isAssignableFrom(irHandlerClass)) {
-					irHandler = (ProtectedItemRemoveHandler) irHandlerClass.newInstance();
-				}
-			}
+            if (!className.isEmpty()) {
+                Class<?> irHandlerClass = Class.forName(className);
+                if (ProtectedItemRemoveHandler.class.isAssignableFrom(irHandlerClass)) {
+                    irHandler = (ProtectedItemRemoveHandler) irHandlerClass.newInstance();
+                }
+            }
         } catch (ClassNotFoundException e) {
             log.error(e.getMessage(), e);
         } catch (InstantiationException e) {
@@ -103,10 +103,10 @@ class ProtectedRemoveManager {
         }
         return irHandler;
     }
-    
+
     void addHandler(ProtectedItemRemoveHandler instance) {
-		if (instance != null) {
-			handlers.add(instance);
-		}
-	}
+        if (instance != null) {
+            handlers.add(instance);
+        }
+    }
 }

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/HttpMultipartPost.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/HttpMultipartPost.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/HttpMultipartPost.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/HttpMultipartPost.java Tue Jul  4 10:53:13 2017
@@ -40,9 +40,6 @@ import java.util.Set;
  */
 class HttpMultipartPost {
 
-    /**
-     * logger instance
-     */
     private static final Logger log = LoggerFactory.getLogger(HttpMultipartPost.class);
 
     private final Map<String, List<FileItem>> nameToItems = new LinkedHashMap<String, List<FileItem>>();
@@ -55,22 +52,11 @@ class HttpMultipartPost {
         initialized = true;
     }
 
-    /**
-     *
-     * @param tmpDir
-     * @return
-     */
     private static FileItemFactory getFileItemFactory(File tmpDir) {
         DiskFileItemFactory fiFactory = new DiskFileItemFactory(DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, tmpDir);
         return fiFactory;
     }
 
-    /**
-     * 
-     * @param request
-     * @param tmpDir
-     * @throws IOException
-     */
     private void extractMultipart(HttpServletRequest request, File tmpDir)
             throws IOException {
         if (!ServletFileUpload.isMultipartContent(request)) {
@@ -128,8 +114,8 @@ class HttpMultipartPost {
     }
 
     /**
-     * Release all file items hold with the name-to-items map. specially those
-     * having a tmp-file associated with.
+     * Release all file items hold with the name-to-items map. Especially those
+     * having a temporary file associated with.
      * 
      * @see FileItem#delete()
      */
@@ -159,12 +145,12 @@ class HttpMultipartPost {
 
 
     /**
-     * Returns the content types of the paramaters with the given name. If
+     * Returns the content types of the parameters with the given name. If
      * the parameter does not exist <code>null</code> is returned. If the content
      * type of any of the parameter values is not known, the corresponding entry
      * in the array returned is <code>null</code>.
      * <p>
-     * The content type of a paramater is only known here if the information
+     * The content type of a parameter is only known here if the information
      * has been sent by the client browser. This is generally only the case
      * for file upload fields of HTML forms which have been posted using the
      * HTTP <em>POST</em> with <em>multipart/form-data</em> encoding.
@@ -183,7 +169,7 @@ class HttpMultipartPost {
      * entry will be <code>null</code> because the content type of the text
      * input field will generally not be sent by the client.
      *
-     * @param name The name of the paramater whose content type is to be
+     * @param name The name of the parameter whose content type is to be
      * returned.
      * @return The content types of the file items with the specified name.
      */
@@ -202,7 +188,7 @@ class HttpMultipartPost {
     
     /**
      * Returns the first value of the file items with the given <code>name</code>.
-     * The byte to string converstion is done using either the contenttype of
+     * The byte to string conversion is done using either the content type of
      * the file items or the <code>formEncoding</code>.
      * <p>
      * Please note that if the addressed parameter is an uploaded file rather
@@ -271,7 +257,7 @@ class HttpMultipartPost {
         checkInitialized();
         return fileParamNames;
     }
-    
+
     /**
      * Returns an array of input streams for uploaded file parameters.
      *

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/RequestData.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/RequestData.java?rev=1800752&r1=1800751&r2=1800752&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/RequestData.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/util/RequestData.java Tue Jul  4 10:53:13 2017
@@ -42,7 +42,7 @@ public class RequestData {
     public void dispose() {
         mpReq.dispose();
     }
-    
+
     /**
      * Returns an iterator over all parameter names.
      * 
@@ -52,7 +52,7 @@ public class RequestData {
         @SuppressWarnings("unchecked")
         HashSet<String> names = new HashSet<String>(request.getParameterMap().keySet());
         names.addAll(mpReq.getParameterNames());
-        
+
         return names.iterator();
     }
 
@@ -86,7 +86,7 @@ public class RequestData {
         String[] types = mpReq.getParameterTypes(name);
         return types == null ? null : types;
     }
-    
+
     /**
      * Returns an array of Strings with all values of the parameter addressed
      * by <code>name</code>. the byte to string conversion is done using either



Mime
View raw message