forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r629441 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Date Wed, 20 Feb 2008 12:40:32 GMT
Author: thorsten
Date: Wed Feb 20 04:40:28 2008
New Revision: 629441

URL: http://svn.apache.org/viewvc?rev=629441&view=rev
Log:
Fixing NPE in validity check since the resolve needs to be initialized in the setup.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java?rev=629441&r1=629440&r2=629441&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Wed Feb 20 04:40:28 2008
@@ -267,7 +267,8 @@
    */
   public void dispose() {
     if (null != this.manager) {
-      this.manager.release(m_resolver);
+      if (null!=m_resolver)
+        this.manager.release(m_resolver);
       this.manager = null;
     }
     m_resolver = null;
@@ -329,6 +330,13 @@
 
     this.hooksXSL = parameters.getParameter(HOOKS_TRANSFORMER_PARAMETER, null);
     parameterHelper.put(HOOKS_TRANSFORMER_PARAMETER, hooksXSL);
+    if (null == m_resolver)
+      try {
+        m_resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
+      } catch (ServiceException e) {
+        throw new ProcessingException(e);
+      }
+
   }
 
   /**
@@ -516,8 +524,6 @@
         if (null == this.processor)
           this.processor = (XPathProcessor) this.manager
               .lookup(XPathProcessor.ROLE);
-        if (null == m_resolver)
-          m_resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
       } catch (Exception e) {
         String error = "dispatcherError:\n Could not set up the dispatcherHelper!\n DispatcherStack:
"
             + e;



Mime
View raw message