incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r964331 - in /sling/trunk/bundles: jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/ jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/ jcr/resource/src/main/java/org/ap...
Date Thu, 15 Jul 2010 07:30:43 GMT
Author: cziegeler
Date: Thu Jul 15 07:30:42 2010
New Revision: 964331

URL: http://svn.apache.org/viewvc?rev=964331&view=rev
Log:
Clean up code

Modified:
    sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
    sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
    sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ReferenceParser.java

Modified: sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java?rev=964331&r1=964330&r2=964331&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
(original)
+++ sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
Thu Jul 15 07:30:42 2010
@@ -43,7 +43,6 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.sling.jcr.contentloader.ImportOptions;
 import org.osgi.framework.Bundle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -445,7 +444,7 @@ public class Loader extends BaseImportLo
                 // this is a consumed node descriptor
                 return;
             }
-    
+
             // check for node descriptor
             URL nodeDescriptor = null;
             for (String ext : this.contentCreator.getImportProviders().keySet()) {
@@ -454,10 +453,10 @@ public class Loader extends BaseImportLo
                     break;
                 }
             }
-    
+
             // install if it is a descriptor
             boolean foundProvider = this.contentCreator.getImportProvider(entry) != null;
-    
+
             Node node = null;
             if (foundProvider) {
                 if ((node = createNode(parent, name, file, configuration)) != null) {
@@ -469,7 +468,7 @@ public class Loader extends BaseImportLo
             } else {
                 log.debug("Cant find provider for Entry {} at {} ",entry,name);
             }
-    
+
             // otherwise just place as file
             if ( node == null ) {
                 try {
@@ -663,14 +662,14 @@ public class Loader extends BaseImportLo
     private void uninstallContent(final Session defaultSession, final Bundle bundle,
             final String[] uninstallPaths) {
         final Map<String, Session> createdSessions = new HashMap<String, Session>();
-        
+
         try {
             log.debug("Uninstalling initial content from bundle {}",
                 bundle.getSymbolicName());
             if ( uninstallPaths != null && uninstallPaths.length > 0 ) {
                 for(String path : uninstallPaths) {
                     final Session targetSession;
-                    
+
                     final int wsSepPos = path.indexOf(":/");
                     if (wsSepPos != -1) {
                         final String workspaceName = path.substring(0, wsSepPos);
@@ -691,7 +690,7 @@ public class Loader extends BaseImportLo
                         targetSession.getItem(path).remove();
                     }
                 }
-                
+
                 // persist modifications now
                 defaultSession.save();
 
@@ -720,7 +719,7 @@ public class Loader extends BaseImportLo
                     "Failure to rollback uninstaling initial content for bundle {}",
                     bundle.getSymbolicName(), re);
             }
-            
+
             for (Session session : createdSessions.values()) {
                 session.logout();
             }

Modified: sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java?rev=964331&r1=964330&r2=964331&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-accessmanager/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/GetAclServlet.java
Thu Jul 15 07:30:42 2010
@@ -43,7 +43,6 @@ import org.apache.sling.api.SlingHttpSer
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
-import org.apache.sling.commons.json.JSONArray;
 import org.apache.sling.commons.json.JSONObject;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.slf4j.Logger;
@@ -137,13 +136,13 @@ public class GetAclServlet extends Sling
 	protected void doGet(SlingHttpServletRequest request,
 			SlingHttpServletResponse response) throws ServletException,
 			IOException {
-		
+
         try {
     		Session session = request.getResourceResolver().adaptTo(Session.class);
     		if (session == null) {
     			throw new RepositoryException("JCR Session not found");
     		}
-    		
+
         	String resourcePath = null;
         	Resource resource = request.getResource();
         	if (resource == null) {
@@ -192,7 +191,7 @@ public class GetAclServlet extends Sling
     				}
     			}
     		}
-        	
+
 
         	response.setContentType("application/json");
         	response.setCharacterEncoding("UTF-8");
@@ -210,7 +209,7 @@ public class GetAclServlet extends Sling
         		if (grantedSet != null) {
             		aceObject.put("granted", grantedSet);
         		}
-        		
+
         		Set<String> deniedSet = (Set<String>) value.get("denied");
         		if (deniedSet != null) {
         			aceObject.put("denied", deniedSet);
@@ -247,5 +246,5 @@ public class GetAclServlet extends Sling
 		}
 		return new AccessControlEntry[0];
 	}
-	
+
 }

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=964331&r1=964330&r2=964331&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Thu Jul 15 07:30:42 2010
@@ -37,7 +37,6 @@ import org.apache.commons.collections.bi
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.ResourceDecorator;
 import org.apache.sling.api.resource.ResourceProvider;
-import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.commons.classloader.DynamicClassLoaderManager;
 import org.apache.sling.commons.osgi.OsgiUtil;

Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ReferenceParser.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ReferenceParser.java?rev=964331&r1=964330&r2=964331&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ReferenceParser.java
(original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ReferenceParser.java
Thu Jul 15 07:30:42 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.sling.servlets.post.impl.helper;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
 import javax.jcr.Node;



Mime
View raw message