cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/util JDBCTypeConversions.java
Date Wed, 24 Sep 2003 21:54:49 GMT
cziegeler    2003/09/24 14:54:49

  Modified:    src/blocks/chaperon/java/org/apache/cocoon/transformation
                        LexicalTransformer.java ParserTransformer.java
               src/blocks/databases/java/org/apache/cocoon/components/modules/database
                        PgsqlAutoIncrementModule.java
                        IfxSerialAutoIncrementModule.java
               src/blocks/databases/java/org/apache/cocoon/components/source/impl
                        BlobSource.java
               src/blocks/jfor/java/org/apache/cocoon/serialization
                        RTFSerializer.java
               src/blocks/databases/java/org/apache/cocoon/acting/modular
                        DatabaseQueryAction.java DatabaseAction.java
               src/blocks/databases/java/org/apache/cocoon/util
                        JDBCTypeConversions.java
  Log:
  Removing unused imports and casts
  
  Revision  Changes    Path
  1.5       +6 -10     cocoon-2.1/src/blocks/chaperon/java/org/apache/cocoon/transformation/LexicalTransformer.java
  
  Index: LexicalTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/java/org/apache/cocoon/transformation/LexicalTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LexicalTransformer.java	9 Apr 2003 12:17:20 -0000	1.4
  +++ LexicalTransformer.java	24 Sep 2003 21:54:48 -0000	1.5
  @@ -114,14 +114,12 @@
     implements Transformer, LogEnabled, Composable, Recyclable, Disposable,
                Parameterizable, CacheableProcessingComponent {
   
  -    private XMLConsumer consumer = null;
  +    private String lexicon;
  +    private Source lexiconSource;
   
  -    private String lexicon = null;
  -    private Source lexiconSource = null;
  -
  -    private Logger logger = null;
  -    private ComponentManager manager = null;
  -    private SourceResolver resolver = null;
  +    private Logger logger;
  +    private ComponentManager manager;
  +    private SourceResolver resolver;
   
       private LexicalAutomaton automaton = null;
       private LexicalHandlerAdapter adapter = new LexicalHandlerAdapter(true);
  @@ -164,8 +162,6 @@
        * @param consumer
        */
       public void setConsumer(XMLConsumer consumer) {
  -        this.consumer = consumer;
  -
           setContentHandler(consumer);
           setLexicalHandler(consumer);
   
  
  
  
  1.5       +7 -11     cocoon-2.1/src/blocks/chaperon/java/org/apache/cocoon/transformation/ParserTransformer.java
  
  Index: ParserTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/java/org/apache/cocoon/transformation/ParserTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParserTransformer.java	9 Apr 2003 12:17:20 -0000	1.4
  +++ ParserTransformer.java	24 Sep 2003 21:54:48 -0000	1.5
  @@ -116,16 +116,14 @@
     implements Transformer, LogEnabled, Composable, Parameterizable,
                Recyclable, Disposable, CacheableProcessingComponent {
   
  -    private XMLConsumer consumer = null;
  +    private String grammar;
  +    private Source grammarSource;
   
  -    private String grammar = null;
  -    private Source grammarSource = null;
  +    private Logger logger;
  +    private ComponentManager manager;
  +    private SourceResolver resolver;
   
  -    private Logger logger = null;
  -    private ComponentManager manager = null;
  -    private SourceResolver resolver = null;
  -
  -    private ParserAutomaton automaton = null;
  +    private ParserAutomaton automaton;
       private ParserHandlerAdapter adapter = new ParserHandlerAdapter(true);
       private boolean recovery = false;
   
  @@ -169,8 +167,6 @@
        * @param consumer
        */
       public void setConsumer(XMLConsumer consumer) {
  -        this.consumer = consumer;
  -
           setContentHandler(consumer);
           setLexicalHandler(consumer);
   
  
  
  
  1.2       +2 -2      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/modules/database/PgsqlAutoIncrementModule.java
  
  Index: PgsqlAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/modules/database/PgsqlAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PgsqlAutoIncrementModule.java	9 Mar 2003 00:03:09 -0000	1.1
  +++ PgsqlAutoIncrementModule.java	24 Sep 2003 21:54:48 -0000	1.2
  @@ -98,7 +98,7 @@
               queryBuffer.append('_');
               queryBuffer.append(columnConf.getAttribute("name"));
               queryBuffer.append("_seq");
  -        };
  +        }
           queryBuffer.append("')");
           
           PreparedStatement pstmt = conn.prepareStatement(queryBuffer.toString());
  
  
  
  1.2       +6 -6      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/modules/database/IfxSerialAutoIncrementModule.java
  
  Index: IfxSerialAutoIncrementModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/modules/database/IfxSerialAutoIncrementModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IfxSerialAutoIncrementModule.java	9 Mar 2003 00:03:08 -0000	1.1
  +++ IfxSerialAutoIncrementModule.java	24 Sep 2003 21:54:48 -0000	1.2
  @@ -76,25 +76,25 @@
           throws SQLException, ConfigurationException {
   
           return new Integer(((com.informix.jdbc.IfxStatement) stmt).getSerial());
  -    };
  +    }
   
   
  -    public boolean includeInQuery() { return false; };
  +    public boolean includeInQuery() { return false; }
   
   
  -    public boolean includeAsValue() { return false; };
  +    public boolean includeAsValue() { return false; }
   
   
       public Object getPreValue( Configuration tableConf, Configuration columnConf, Configuration
modeConf,
                                  Connection conn, Map objectModel ) throws SQLException,
ConfigurationException {
   
           return null;
  -    };
  +    }
   
       public String getSubquery( Configuration tableConf, Configuration columnConf, Configuration
modeConf )
           throws ConfigurationException {
   
           return null;
  -    };
  +    }
   
   }
  
  
  
  1.3       +2 -2      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSource.java
  
  Index: BlobSource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BlobSource.java	5 Sep 2003 07:10:54 -0000	1.2
  +++ BlobSource.java	24 Sep 2003 21:54:48 -0000	1.3
  @@ -391,7 +391,7 @@
                       cnx = null;
                       tmp.close();
                   } catch(Exception e) {
  -                    String msg = "Error closing the connection for " + BlobSource.this.systemId;
  +                    String msg = "Error closing the connection for " + BlobSource.this.getURI();
                       BlobSource.this.getLogger().warn(msg, e);
                       throw new CascadingIOException(msg + " : " + e.getMessage(), e);
                   }
  
  
  
  1.2       +11 -23    cocoon-2.1/src/blocks/jfor/java/org/apache/cocoon/serialization/RTFSerializer.java
  
  Index: RTFSerializer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/jfor/java/org/apache/cocoon/serialization/RTFSerializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RTFSerializer.java	9 Mar 2003 00:04:08 -0000	1.1
  +++ RTFSerializer.java	24 Sep 2003 21:54:48 -0000	1.2
  @@ -56,10 +56,7 @@
   import java.io.Writer;
   
   import org.apache.avalon.framework.CascadingRuntimeException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.logger.LogEnabled;
  -
   import org.jfor.jfor.converter.Converter;
   
   /**
  @@ -71,20 +68,11 @@
    */
   
   public class RTFSerializer extends AbstractTextSerializer
  -  implements Composable, LogEnabled {
  -
  -    private Writer rtfWriter = null;
  -    private Converter handler = null;
  -    private ComponentManager manager = null;
  +  implements LogEnabled {
   
  +    private Writer rtfWriter;
  +    private Converter handler;
   
  -    /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  -     */
  -    public void compose(ComponentManager manager) {
  -      this.manager = manager;
  -    }
   
       /**
        * Set the OutputStream where the serializer will write to.
  @@ -93,13 +81,13 @@
        */
       public void setOutputStream(OutputStream out) {
           try {
  -          rtfWriter =
  +            rtfWriter =
               new BufferedWriter(new OutputStreamWriter(out, "ISO-8859-1"));
   
  -          // FIXME Find a way to work with the org.apache.avalon.framework.logger.Logger
  -          handler = new Converter(rtfWriter,
  -            Converter.createConverterOption(System.out));
  -          super.setContentHandler(handler);
  +            // FIXME Find a way to work with the org.apache.avalon.framework.logger.Logger
  +            handler = new Converter(rtfWriter,
  +               Converter.createConverterOption(System.out));
  +            super.setContentHandler(handler);
   
           } catch (Exception e) {
               getLogger().error("RTFSerializer.setOutputStream()", e);
  @@ -112,7 +100,7 @@
        */
       public void recycle() {
           super.recycle();
  -        rtfWriter = null;
  -        handler = null;
  +        this.rtfWriter = null;
  +        this.handler = null;
       }
   }
  
  
  
  1.2       +2 -2      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java
  
  Index: DatabaseQueryAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatabaseQueryAction.java	9 Mar 2003 00:03:04 -0000	1.1
  +++ DatabaseQueryAction.java	24 Sep 2003 21:54:48 -0000	1.2
  @@ -131,7 +131,7 @@
                   boolean useValues = true;
                   for (int i=0; i<queries.length; i++) {
                       queryModeName = queries[i].getAttribute("mode",null);
  -                    if ( queryModeName.equals((String)modeTypes.get(MODE_OTHERS)) || "all".equals(queryModeName))
{
  +                    if ( queryModeName.equals(modeTypes.get(MODE_OTHERS)) || "all".equals(queryModeName))
{
                           query = queries[i].getValue();
                           useValues = queries[i].getAttributeAsBoolean("use-values", useValues);
                           found = true;
  
  
  
  1.4       +5 -5      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseAction.java
  
  Index: DatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseAction.java	1 Jul 2003 11:23:19 -0000	1.3
  +++ DatabaseAction.java	24 Sep 2003 21:54:48 -0000	1.4
  @@ -245,7 +245,7 @@
                   } catch (NumberFormatException nfe) {
                       if (getLogger().isWarnEnabled())
                           getLogger().warn("problem parsing first row option "+tmp+" using
default instead.");
  -                };
  +                }
               }
               tmp = (String) this.settings.get("fail-on-empty",String.valueOf(this.failOnEmpty));
               this.failOnEmpty = tmp.equalsIgnoreCase("true") || tmp.equalsIgnoreCase("yes");
  @@ -366,7 +366,7 @@
                       queryData = this.getQuery( table, modeTypes, defaultModeNames );
                       this.cachedQueryData.put(luk,queryData);
                   }
  -            };
  +            }
   
               if (getLogger().isDebugEnabled())
                   getLogger().debug("query: "+queryData.queryString);
  @@ -414,7 +414,7 @@
   
           String modeAll = "all";
           Configuration[] modes = conf.getChildren("mode");
  -        Configuration modeConfig = null;;
  +        Configuration modeConfig = null;
   
           for ( int i=0; i<modes.length; i++ ) {
               String modeType = modes[i].getAttribute("type", "others");
  @@ -423,7 +423,7 @@
                       getLogger().debug("requested mode was \""+type+"\" returning \""+modeType+"\"");
                   modeConfig = modes[i];
                   break;
  -            };
  +            }
           }
   
           return modeConfig;
  
  
  
  1.5       +3 -3      cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/util/JDBCTypeConversions.java
  
  Index: JDBCTypeConversions.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/util/JDBCTypeConversions.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JDBCTypeConversions.java	1 Jul 2003 11:29:55 -0000	1.4
  +++ JDBCTypeConversions.java	24 Sep 2003 21:54:49 -0000	1.5
  @@ -311,7 +311,7 @@
               } else if (value instanceof Part) {
                   Part anyFile = (Part) value;
                   asciiStream = new BufferedInputStream(anyFile.getInputStream());
  -                length = (int) anyFile.getSize();
  +                length = anyFile.getSize();
                   clob = new ClobHelper(asciiStream, length);
               } else if (value instanceof JDBCxlobHelper) {
                   asciiStream = ((JDBCxlobHelper) value).inputStream;
  @@ -347,7 +347,7 @@
               } else if (value instanceof Part) {
                   Part anyFile = (Part) value;
                   asciiStream = new BufferedInputStream(anyFile.getInputStream());
  -                length = (int) anyFile.getSize();
  +                length = anyFile.getSize();
                   clob = new ClobHelper(asciiStream, length);
               } else {
                   String asciiText = value.toString();
  
  
  

Mime
View raw message