incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r579491 - in /incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components: AbstractRepositoryComponent.java extensions/AbstractExtension.java
Date Wed, 26 Sep 2007 07:06:36 GMT
Author: cziegeler
Date: Wed Sep 26 00:06:35 2007
New Revision: 579491

URL: http://svn.apache.org/viewvc?rev=579491&view=rev
Log:
Add discriminator flag to mapping for abstract extension and add empty extension collection
to AbstractRepositoryComponent to avoid NPEs later on (if no mapping has been applied).

Modified:
    incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/AbstractRepositoryComponent.java
    incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/extensions/AbstractExtension.java

Modified: incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/AbstractRepositoryComponent.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/AbstractRepositoryComponent.java?rev=579491&r1=579490&r2=579491&view=diff
==============================================================================
--- incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/AbstractRepositoryComponent.java
(original)
+++ incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/AbstractRepositoryComponent.java
Wed Sep 26 00:06:35 2007
@@ -19,6 +19,7 @@
 package org.apache.sling.core.components;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -37,7 +38,7 @@
     /** @ocm.field path="true" */
     private String path;
 
-    private Map<String, ComponentExtension> extensions;
+    private Map<String, ComponentExtension> extensions = Collections.emptyMap();
 
     public ComponentExtension getExtension(String name) {
         return this.extensions.get(name);

Modified: incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/extensions/AbstractExtension.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/extensions/AbstractExtension.java?rev=579491&r1=579490&r2=579491&view=diff
==============================================================================
--- incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/extensions/AbstractExtension.java
(original)
+++ incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/extensions/AbstractExtension.java
Wed Sep 26 00:06:35 2007
@@ -23,7 +23,7 @@
 /**
  * The <code>AbstractExtension</code> TODO
  *
- * @ocm.mapped jcrType="sling:Extension" abstract="true" interfaces=""
+ * @ocm.mapped jcrType="sling:Extension" abstract="true" interfaces="" discriminator="false"
  */
 public abstract class AbstractExtension implements ComponentExtension {
 



Mime
View raw message