openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1682380 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
Date Fri, 29 May 2015 07:36:49 GMT
Author: struberg
Date: Fri May 29 07:36:49 2015
New Revision: 1682380

URL: http://svn.apache.org/r1682380
Log:
OWB-989 fix potential NPEs

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java?rev=1682380&r1=1682379&r2=1682380&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
Fri May 29 07:36:49 2015
@@ -221,7 +221,10 @@ public class DefaultBeanArchiveService i
         {
             try
             {
-                xmlStream.close();
+                if (xmlStream != null)
+                {
+                    xmlStream.close();
+                }
             }
             catch (IOException ioe)
             {
@@ -454,7 +457,7 @@ public class DefaultBeanArchiveService i
                     {
                         final String value = getTrimmedAttribute(condition, "value");
                         final String systProp = System.getProperty(getTrimmedAttribute(condition,
"name"));
-                        if ((value == null && systProp == null) || !value.equals(systProp))
+                        if ((value == null && systProp == null) || !(value != null
&& value.equals(systProp)))
                         {
                             skip = true;
                             break;



Mime
View raw message