incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r578080 - /incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/BaseComponent.java
Date Fri, 21 Sep 2007 12:10:03 GMT
Author: fmeschbe
Date: Fri Sep 21 05:09:55 2007
New Revision: 578080

URL: http://svn.apache.org/viewvc?rev=578080&view=rev
Log:
Allow the abstract doInit method to throw a ComponentException and forward this in the init
method

Modified:
    incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/BaseComponent.java

Modified: incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/BaseComponent.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/BaseComponent.java?rev=578080&r1=578079&r2=578080&view=diff
==============================================================================
--- incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/BaseComponent.java
(original)
+++ incubator/sling/trunk/core/src/main/java/org/apache/sling/core/components/BaseComponent.java
Fri Sep 21 05:09:55 2007
@@ -23,6 +23,7 @@
 
 import org.apache.sling.component.Component;
 import org.apache.sling.component.ComponentContext;
+import org.apache.sling.component.ComponentException;
 import org.apache.sling.component.ComponentExtension;
 import org.apache.sling.component.Content;
 
@@ -78,7 +79,7 @@
         return this.componentId;
     }
 
-    public void init(ComponentContext context) {
+    public void init(ComponentContext context) throws ComponentException {
         this.context = context;
         this.doInit();
     }
@@ -87,7 +88,7 @@
         // nothing to do here, overwrite if needed
     }
 
-    protected abstract void doInit();
+    protected abstract void doInit() throws ComponentException;
 
     protected void setContentClassName(String contentClassName) {
         this.contentClassName = contentClassName;



Mime
View raw message