jicarilla-sandbox/platform/container/impl/src/java/org/jicarilla/container/builder EntryHelper.java,1.6,1.7 DefaultBuilder.java,1.11,1.12

Leo Simons <[email protected]>
Newsgroups gmane.comp.java.jicarilla.cvs
Message-ID <[email protected]>
Update of /cvsroot/jicarilla/jicarilla-sandbox/platform/container/impl/src/java/org/jicarilla/container/builder
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7027/platform/container/impl/src/java/org/jicarilla/container/builder

Modified Files:
	EntryHelper.java DefaultBuilder.java 
Log Message:
there's too much duplicated code here between EntryHelper and DefaultBuilder! This decomposition sucks.

Index: EntryHelper.java
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/platform/container/impl/src/java/org/jicarilla/container/builder/EntryHelper.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- EntryHelper.java	17 Mar 2004 18:17:26 -0000	1.6
+++ EntryHelper.java	17 Mar 2004 18:23:31 -0000	1.7
@@ -25,7 +25,6 @@
 ==================================================================== */
 package org.jicarilla.container.builder;
 
-import org.jicarilla.container.JicarillaIllegalStateException;
 import org.jicarilla.container.KeyAwareAdapter;
 import org.jicarilla.container.Resolver;
 import org.jicarilla.container.KeyRelayingContainer;
@@ -65,8 +64,8 @@
         final Object component = entry.getComponent();
         final Object helper = m_helpers.get( component );
 
-        if( helper == null )
-            throw new NoUsableHelperException( component );
+        // DefaultHelper will always work... if( helper == null )
+        //    throw new NoUsableHelperException( component );
 
         if( helper instanceof ContainerAwareBuilderHelper )
         {
@@ -75,18 +74,18 @@
 
             return builder.getAdapter( component, m_target.getResolver() );
         }
-        else if( helper instanceof BuilderHelper )
+        else // we assume builder is correctly populated...  if( helper instanceof BuilderHelper )
         {
             final BuilderHelper builder = (BuilderHelper)helper;
             return builder.getAdapter( component );
         }
-        else
+        /*else
         {
             throw new JicarillaIllegalStateException(
                     "Found a helper for " + component + " but the helper is " +
                     "not a ContainerAwareBuilderHelper or a BuilderHelper " +
                     "so we don't know what to do with it!" );
-        }
+        }*/
     }
 
     public Selector getSelector( final Object provider ) throws Exception

Index: DefaultBuilder.java
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/platform/container/impl/src/java/org/jicarilla/container/builder/DefaultBuilder.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- DefaultBuilder.java	17 Mar 2004 16:35:26 -0000	1.11
+++ DefaultBuilder.java	17 Mar 2004 18:23:31 -0000	1.12
@@ -30,7 +30,6 @@
 import org.jicarilla.container.KeyAwareAdapter;
 import org.jicarilla.container.Resolver;
 import org.jicarilla.container.ResolverProvider;
-import org.jicarilla.container.JicarillaIllegalStateException;
 import org.jicarilla.container.KeyRelayingContainer;
 import org.jicarilla.container.DefaultKeyRelayingContainer;
 import org.jicarilla.container.factories.Type3Factory;



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.