if ( stateTag == null )
try { state = getCurrentState(); } catch (JellyException e)
    public void doTag(XMLOutput output) throws Exception    {        StateTag stateTag = (StateTag) findAncestorWithClass( StateTag.class );        if ( stateTag == null )        {            throw new JellyException( "Unable to locate a state." );        }        State state = stateTag.getState();        if ( state.getActivity() != null             &&             ! ( state.getActivity() instanceof NoOpActivity ) )        {            throw new JellyException( "Activity already defined for state \""                                      + state.getName()                                      + "\"" );        }        Script script = getBody();                Activity activity = new JellyActivity( script );        state.setActivity( activity );    }