axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils Admin.java
Date Tue, 06 Feb 2001 19:42:50 GMT
dug         01/02/06 11:42:50

  Modified:    java/src/org/apache/axis/utils Admin.java
  Log:
  Add more error checks to Admin tool
  
  Revision  Changes    Path
  1.10      +25 -6     xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Admin.java	2001/02/04 13:45:36	1.9
  +++ Admin.java	2001/02/06 19:42:50	1.10
  @@ -162,6 +162,10 @@
             String   input   = elem.getAttribute( "input" );
             String   pivot   = elem.getAttribute( "pivot" );
             String   output  = elem.getAttribute( "output" );
  + 
  +          String   hName ;
  +          Handler  tmpH ;
  +
             if ( flow != null && flow.length() > 0 ) {
               System.out.println( "Deploying chain: " + name );
               Chain    c       = (Chain) hr.find( name );
  @@ -170,8 +174,13 @@
               else             c.clear();
   
               StringTokenizer st = new StringTokenizer( flow, " \t\n\r\f," );
  -            while ( st.hasMoreElements() )
  -              c.addHandler( hr.find( st.nextToken() ) );
  +            while ( st.hasMoreElements() ) {
  +              hName = st.nextToken();
  +              tmpH = hr.find( hName );
  +              if ( tmpH == null )
  +                Error( "Unknown handler: " + hName );
  +              c.addHandler( tmpH );
  +            }
               getOptions( elem, c );
               hr.add( name, c );
             }
  @@ -189,16 +198,26 @@
               st = new StringTokenizer( input, " \t\n\r\f," );
               c  = new SimpleChain();
               cc.setInputChain( c );
  -            while ( st.hasMoreElements() )
  -              c.addHandler( hr.find( st.nextToken() ) );
  +            while ( st.hasMoreElements() ) {
  +              hName = st.nextToken();
  +              tmpH = hr.find( hName );
  +              if ( tmpH == null )
  +                Error( "Unknown handler: " + hName );
  +              c.addHandler( tmpH );
  +            }
             
               cc.setPivotHandler( hr.find( pivot ) );
     
               st = new StringTokenizer( output, " \t\n\r\f," );
               c  = new SimpleChain();
               cc.setOutputChain( c );
  -            while ( st.hasMoreElements() )
  -              c.addHandler( hr.find( st.nextToken() ) );
  +            while ( st.hasMoreElements() ) {
  +              hName = st.nextToken();
  +              tmpH = hr.find( hName );
  +              if ( tmpH == null )
  +                Error( "Unknown handler: " + hName );
  +              c.addHandler( tmpH );
  +            }
               getOptions( elem, cc );
               hr.add( name, cc );
             }
  
  
  

Mime
View raw message