Uncommented some rather critical data structure code to end the onslaught of NPEs.

This commit is contained in:
travismccauley 2003-12-15 18:02:02 +00:00
parent 7e5c2143a9
commit 03920cfc6c
5 changed files with 31 additions and 23 deletions

View file

@ -164,7 +164,7 @@
<remove url="${url}" username="${username}" password="${password}" path="${path}"/>
</target>
<target name="test" description="Run unit tests">
<target name="test" description="Run load and functional tests">
<java classname="org.thdl.lex.test.MainMenuTestCase" classpathref="classpath" fork="yes">
<classpath>
<pathelement location="${build}/WEB-INF/classes"/>

View file

@ -158,8 +158,8 @@ public class LoginServlet extends HttpServlet
}
catch ( ThdlUserRepositoryException ture )
{
//doLoginFailure( request, response, username );
throw new ServletException( ture );
doLoginFailure( request, response, username );
//throw new ServletException( ture );
}
catch ( Exception e )
{

View file

@ -58,17 +58,17 @@ public class Definition extends BaseDefinition implements Serializable, Translat
}
LexComponentNode node = (LexComponentNode) component.getParent();
list = (List) node.getChildMap().get( component.getLabel() );
/*
if ( null == list )
{
Iterator it = getSubefinitions().iterator();
while ( it.hasNext() )
{
ISubdefinition subdef = (ISubdefinition) it.next();
list = subdef.findSiblings( component );
}
}
*/
if ( null == list )
{
Iterator it = getSubdefinitions().iterator();
while ( it.hasNext() )
{
ISubdefinition subdef = (ISubdefinition) it.next();
list = subdef.findSiblings( component );
}
}
return list;
}

View file

@ -20,6 +20,14 @@ public interface LexComponentNode extends ILexComponent
*/
public java.util.HashMap getChildMap();
// public java.util.List getSiblings();
/**
* Description of the Method
*
* @param component Description of the Parameter
* @return Description of the Return Value
* @exception LexComponentException Description of the Exception
*/
public java.util.List findSiblings( ILexComponent component ) throws LexComponentException;
}

View file

@ -108,14 +108,14 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
{
LexLogger.debug( "findSiblings returned a null list" );
LexLogger.debugComponent( component );
/*
Iterator it = getDefinitions().iterator();
while ( it.hasNext() )
{
IDefinition def = (IDefinition) it.next();
list = def.findSiblings( component );
}
*/
Iterator it = getDefinitions().iterator();
while ( it.hasNext() )
{
IDefinition def = (IDefinition) it.next();
list = def.findSiblings( component );
}
}
return list;