You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:00:14 UTC
[sling-org-apache-sling-resourceresolver] 44/47: SLING-2530 :
Implement CRUD based on resources
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.resourceresolver-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
commit 55dde359bf96ef4eccb5f17f105fbff98ad391f9
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Nov 9 10:14:28 2012 +0000
SLING-2530 : Implement CRUD based on resources
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver@1407408 13f79535-47bb-0310-9956-ffa450edef68
---
.../org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
index 02293b7..36dddd5 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
@@ -1015,6 +1015,11 @@ public class ResourceResolverImpl extends SlingAdaptable implements ResourceReso
*/
public void delete(final Resource resource)
throws PersistenceException {
+ // check if the resource is non existing - throws NPE if resource is null as stated in the API
+ if ( ResourceUtil.isNonExistingResource(resource) ) {
+ // nothing to do
+ return;
+ }
// if resource is null, we get an NPE as stated in the API
final String path = resource.getPath();
final ModifyingResourceProvider mrp = this.factory.getRootProviderEntry().getModifyingProvider(this.context,
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.