cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/transformation SQLTransformer.java
Date Sat, 25 Jan 2003 02:15:45 GMT
vgritsenko    2003/01/24 18:15:45

  Modified:    src/blocks/databases/java/org/apache/cocoon/components/modules/database
                        AbstractAutoIncrementModule.java
               src/blocks/databases/java/org/apache/cocoon/transformation
                        SQLTransformer.java
  Log:
  conf in configure() is never null
  
  Revision  Changes    Path
  1.2       +7 -13     xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java
  
  Index: AbstractAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractAutoIncrementModule.java	18 Oct 2002 14:04:26 -0000	1.1
  +++ AbstractAutoIncrementModule.java	25 Jan 2003 02:15:44 -0000	1.2
  @@ -87,18 +87,12 @@
        * For nested configurations override this function.
        * */
       public void configure(Configuration conf) throws ConfigurationException {
  -
  -        if (conf != null) {
  -            String key = null;
  -            String val = null;
  -            Configuration[] parameters = conf.getChildren();
  -            this.settings = new HashMap(parameters.length);
  -            for ( int i = 0; i < parameters.length; i++) {
  -                key = parameters[i].getName();
  -                val = parameters[i].getValue();
  -                if ( key != null )
  -                    this.settings.put(key, val);
  -            }
  +        Configuration[] parameters = conf.getChildren();
  +        this.settings = new HashMap(parameters.length);
  +        for (int i = 0; i < parameters.length; i++) {
  +            String key = parameters[i].getName();
  +            String val = parameters[i].getValue();
  +            this.settings.put(key, val);
           }
       }
   
  
  
  
  1.11      +9 -10     xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SQLTransformer.java	22 Jan 2003 05:19:15 -0000	1.10
  +++ SQLTransformer.java	25 Jan 2003 02:15:44 -0000	1.11
  @@ -238,17 +238,16 @@
       /**
        * configure
        */
  -    public void configure( Configuration conf ) throws ConfigurationException {
  -        super.configure( conf );
  -        if ( conf != null ) {
  -            this.oldDriver = conf.getChild( "old-driver" ).getValueAsBoolean( false );
  -            if (getLogger().isDebugEnabled()) {
  -                getLogger().debug( "old-driver is " + this.oldDriver + " for " + this );
  -            }
  +    public void configure(Configuration conf) throws ConfigurationException {
  +        super.configure(conf);
   
  -            this.connectAttempts = conf.getChild("connect-attempts").getValueAsInteger(5);
  -            this.connectWaittime = conf.getChild("connect-waittime").getValueAsInteger(5000);
  +        this.oldDriver = conf.getChild("old-driver").getValueAsBoolean(false);
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("old-driver is " + this.oldDriver + " for " + this);
           }
  +
  +        this.connectAttempts = conf.getChild("connect-attempts").getValueAsInteger(5);
  +        this.connectWaittime = conf.getChild("connect-waittime").getValueAsInteger(5000);
       }
   
       /**
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message