cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From froehl...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/notification DefaultNotifyingBuilder.java
Date Tue, 07 May 2002 20:36:57 GMT
froehlich    02/05/07 13:36:57

  Modified:    src/java/org/apache/cocoon/components/notification Tag:
                        cocoon_2_0_3_branch DefaultNotifyingBuilder.java
  Log:
  applied patch from Peter Royal (proyal@managingpartners.com)
  Fixed NPE in DefaultNotifyingBuilder.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +8 -4      xml-cocoon2/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java
  
  Index: DefaultNotifyingBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- DefaultNotifyingBuilder.java	18 Mar 2002 12:22:53 -0000	1.6
  +++ DefaultNotifyingBuilder.java	7 May 2002 20:36:57 -0000	1.6.2.1
  @@ -69,7 +69,7 @@
    *
    * @author <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a>
    * @author Marc Liyanage (futureLAB AG)
  - * @version CVS $Id: DefaultNotifyingBuilder.java,v 1.6 2002/03/18 12:22:53 nicolaken Exp
$
  + * @version CVS $Id: DefaultNotifyingBuilder.java,v 1.6.2.1 2002/05/07 20:36:57 froehlich
Exp $
    * @created 24 August 2000
    */
   public class DefaultNotifyingBuilder implements NotifyingBuilder, Component {
  @@ -108,9 +108,13 @@
               TransformerException transformerException = (TransformerException) rootCauseThrowable;
               SourceLocator sourceLocator = transformerException.getLocator();
               n.setMessage         (                           transformerException.getMessage());
  -            n.addExtraDescription("location",                sourceLocator.getSystemId()
     );
  -            n.addExtraDescription("line"    , String.valueOf(sourceLocator.getLineNumber())
  );
  -            n.addExtraDescription("column"  , String.valueOf(sourceLocator.getColumnNumber())
);
  +            
  +            if( null != sourceLocator )
  +            {
  +                n.addExtraDescription("location",                sourceLocator.getSystemId()
     );
  +                n.addExtraDescription("line"    , String.valueOf(sourceLocator.getLineNumber())
  );
  +                n.addExtraDescription("column"  , String.valueOf(sourceLocator.getColumnNumber())
);
  +            }
           }
           else{
                   n.setMessage(t.getMessage());
  
  
  

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