cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/xml ContentHandlerWrapper.java
Date Sat, 14 Apr 2001 21:24:57 GMT
giacomo     01/04/14 14:24:57

  Modified:    src/org/apache/cocoon/transformation Tag: xml-cocoon2
                        TraxTransformer.java
               src/org/apache/cocoon/xml Tag: xml-cocoon2
                        ContentHandlerWrapper.java
  Log:
  Fixed NPE with logger issue
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.18  +10 -11    xml-cocoon/src/org/apache/cocoon/transformation/Attic/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/TraxTransformer.java,v
  retrieving revision 1.1.2.17
  retrieving revision 1.1.2.18
  diff -u -r1.1.2.17 -r1.1.2.18
  --- TraxTransformer.java	2001/04/14 21:08:24	1.1.2.17
  +++ TraxTransformer.java	2001/04/14 21:24:56	1.1.2.18
  @@ -30,7 +30,6 @@
   import org.apache.avalon.Recyclable;
   import org.apache.avalon.Disposable;
   import org.apache.avalon.configuration.Parameters;
  -import org.apache.avalon.Loggable;
   
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.Roles;
  @@ -65,7 +64,7 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1.2.17 $ $Date: 2001/04/14 21:08:24 $
  + * @version CVS $Revision: 1.1.2.18 $ $Date: 2001/04/14 21:24:56 $
    */
   public class TraxTransformer extends ContentHandlerWrapper
   implements Transformer, Composer, Recyclable, Configurable, Cacheable, Disposable {
  @@ -164,11 +163,11 @@
       public void compose(ComponentManager manager) {
           try {
               this.manager = manager;
  -            log.debug("Looking up " + Roles.STORE);
  +            getLogger().debug("Looking up " + Roles.STORE);
               this.store = (Store) manager.lookup(Roles.STORE);
               this.browser = (Browser) manager.lookup(Roles.BROWSER);
           } catch (Exception e) {
  -            log.error("Could not find component", e);
  +            getLogger().error("Could not find component", e);
           }
       }
   
  @@ -234,16 +233,16 @@
           try {
               transformerHandler = getTransformerHandler(resolver);
           } catch (TransformerConfigurationException e){
  -            log.error("Problem in getTransformer:", e);
  +            getLogger().error("Problem in getTransformer:", e);
               throw new RuntimeException("Problem in getTransformer:" + e.getMessage());
           } catch (SAXException e){
  -            log.error("Problem in getTransformer:", e);
  +            getLogger().error("Problem in getTransformer:", e);
               throw new RuntimeException("Problem in getTransformer:" + e.getMessage());
           } catch (IOException e){
  -            log.error("Problem in getTransformer:", e);
  +            getLogger().error("Problem in getTransformer:", e);
               throw new RuntimeException("Problem in getTransformer:" + e.getMessage());
           } catch (ProcessingException e){
  -            log.error("Problem in getTransformer:", e);
  +            getLogger().error("Problem in getTransformer:", e);
               throw new RuntimeException("Problem in getTransformer:" + e.getMessage());
           }
   
  @@ -304,9 +303,9 @@
               transformerHandler.getTransformer().setParameter("ua-capabilities", uaCapabilities);
           } catch (Exception e) {
               /** FIXME - i don't have a logger
  +                (GP) now you have one :) */
               getLogger().error("Error setting Browser info", e);
  -            **/
  -        }    
  +        }
   
           super.setContentHandler(transformerHandler);
           if(transformerHandler instanceof Loggable) {
  @@ -389,7 +388,7 @@
                   method.invoke(transformerHandler,params);
               }
           } catch (Exception e){
  -            log.debug("Exception in recycle:", e);
  +            getLogger().debug("Exception in recycle:", e);
           }
           this.transformerHandler = null;
           this.objectModel = null;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +1 -12     xml-cocoon/src/org/apache/cocoon/xml/Attic/ContentHandlerWrapper.java
  
  Index: ContentHandlerWrapper.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/Attic/ContentHandlerWrapper.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- ContentHandlerWrapper.java	2001/01/22 21:56:55	1.1.2.4
  +++ ContentHandlerWrapper.java	2001/04/14 21:24:56	1.1.2.5
  @@ -19,9 +19,6 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributeListImpl;
   
  -import org.apache.avalon.Loggable;
  -import org.apache.log.Logger;
  -
   /**
    * This class is an utility class &quot;wrapping&quot; around a SAX version 2.0
    * <code>ContentHandler</code> and forwarding it those events received throug
  @@ -30,12 +27,10 @@
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    *         (Apache Software Foundation, Computer Associates)
  - * @version CVS $Revision: 1.1.2.4 $ $Date: 2001/01/22 21:56:55 $
  + * @version CVS $Revision: 1.1.2.5 $ $Date: 2001/04/14 21:24:56 $
    */
   public class ContentHandlerWrapper extends AbstractXMLConsumer implements Recyclable, Loggable
{
   
  -    protected Logger log;
  -
       /** The current <code>ContentHandler</code>. */
       protected ContentHandler documentHandler=null;
   
  @@ -52,12 +47,6 @@
       public ContentHandlerWrapper(ContentHandler document) {
           this();
           this.setContentHandler(document);
  -    }
  -
  -    public void setLogger(Logger logger) {
  -        if (this.log == null) {
  -            this.log = logger;
  -        }
       }
   
       /**
  
  
  

----------------------------------------------------------------------
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