You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2005/01/02 23:26:34 UTC

svn commit: r123906 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java

Author: antonio
Date: Sun Jan  2 14:26:33 2005
New Revision: 123906

URL: http://svn.apache.org/viewcvs?view=rev&rev=123906
Log:
Input select never is null at this point.
Modified:
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java?view=diff&rev=123906&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java&r1=123905&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java&r2=123906
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java	Sun Jan  2 14:26:33 2005
@@ -140,14 +140,13 @@
         ComponentSelector inputSelector = this.inputSelector;
         InputModule module = null;
         try {
-            if (inputSelector == null) 
-                inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
-
-            if (inputSelector.hasComponent(type)){
-                
-                if (type != null && inputSelector.hasComponent(type))
+            if (inputSelector == null) { 
+                inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
+            }
+            if (inputSelector.hasComponent(type)) {
+                if (type != null && inputSelector.hasComponent(type)) {
                     module = (InputModule) inputSelector.select(type);
-                
+                }
                 if (!(module instanceof ThreadSafe) ) {
                     inputSelector.release(module);
                     module = null;
@@ -156,9 +155,8 @@
             if (type != null && module == null)
                 if (getLogger().isWarnEnabled())
                     getLogger().warn("A problem occurred setting up '" + type
-                                     +"': Selector is "+(inputSelector!=null?"not ":"")
-                                     +"null, Component is "
-                                     +(inputSelector!=null && inputSelector.hasComponent(type)?"known":"unknown"));
+                                     + "': Selector is not null, Component is "
+                                     + (inputSelector.hasComponent(type)? "known" : "unknown"));
             
         } catch (ComponentException ce) {
             if (getLogger().isWarnEnabled())