forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gavin" <ga...@16degrees.com.au>
Subject RE: svn commit: r695423 - /forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurer.java
Date Mon, 15 Sep 2008 11:31:40 GMT


> -----Original Message-----
> From: thorsten@apache.org [mailto:thorsten@apache.org]
> Sent: Monday, 15 September 2008 9:04 PM
> To: svn@forrest.apache.org
> Subject: svn commit: r695423 -
> /forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/im
> pl/XMLStructurer.java
> 
> Author: thorsten
> Date: Mon Sep 15 04:04:10 2008
> New Revision: 695423
> 
> URL: http://svn.apache.org/viewvc?rev=695423&view=rev
> Log:
> Fixing possible NPE.
> 
> Modified:
> 
> forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/imp
> l/XMLStructurer.java
> 
> Modified:
> forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/imp
> l/XMLStructurer.java
> URL:
> http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/
> apache/forrest/dispatcher/impl/XMLStructurer.java?rev=695423&r1=695422&r2=
> 695423&view=diff
> ==========================================================================
> ====
> ---
> forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/imp
> l/XMLStructurer.java (original)
> +++
> forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/imp
> l/XMLStructurer.java Mon Sep 15 04:04:10 2008
> @@ -190,7 +190,9 @@
>          this.contractUriPrefix + name + this.contractUriSufix);
>      contract.initializeFromStream(xslStream);
>      // closing stream
> -    xslStream.close();
> +    if(xslStream!=null){
> +      xslStream.close();
> +    }
>      /*
>       * HACK END
>       */
> @@ -203,7 +205,9 @@
>          elementName = reader.getLocalName();
>          if (elementName.equals(CONTRACT_ELEMENT)) {
>            InputStream resultStream = contract.execute(dataStream, param);
> -          dataStream.close();

> +          if (null!=dataStream){

Should that not be the other way around ?

Just checking

Gav...

> +            dataStream.close();
> +          }
>            // FIXME: add the stream to the result map with the actual path
>            process = false;
>          }
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.6.21 - Release Date: 9/11/2008
> 12:00 AM


Mime
View raw message