xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r422550 - in /xml/commons/trunk/java/external/src/javax/xml: datatype/SecuritySupport.java parsers/SecuritySupport.java transform/SecuritySupport.java validation/SecuritySupport.java xpath/SecuritySupport.java
Date Sun, 16 Jul 2006 22:02:56 GMT
Author: mrglavas
Date: Sun Jul 16 15:02:55 2006
New Revision: 422550

URL: http://svn.apache.org/viewvc?rev=422550&view=rev
Log:
Eliminate creation of temporary Boolean objects.

Modified:
    xml/commons/trunk/java/external/src/javax/xml/datatype/SecuritySupport.java
    xml/commons/trunk/java/external/src/javax/xml/parsers/SecuritySupport.java
    xml/commons/trunk/java/external/src/javax/xml/transform/SecuritySupport.java
    xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java
    xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java

Modified: xml/commons/trunk/java/external/src/javax/xml/datatype/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/datatype/SecuritySupport.java?rev=422550&r1=422549&r2=422550&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/datatype/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/datatype/SecuritySupport.java Sun Jul 16
15:02:55 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
+ * Copyright 2003-2004,2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                 }
             })).booleanValue();
     }

Modified: xml/commons/trunk/java/external/src/javax/xml/parsers/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/parsers/SecuritySupport.java?rev=422550&r1=422549&r2=422550&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/parsers/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/parsers/SecuritySupport.java Sun Jul 16
15:02:55 2006
@@ -95,7 +95,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                 }
             })).booleanValue();
     }

Modified: xml/commons/trunk/java/external/src/javax/xml/transform/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/transform/SecuritySupport.java?rev=422550&r1=422549&r2=422550&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/transform/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/transform/SecuritySupport.java Sun Jul 16
15:02:55 2006
@@ -95,7 +95,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                 }
             })).booleanValue();
     }

Modified: xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java?rev=422550&r1=422549&r2=422550&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java Sun Jul
16 15:02:55 2006
@@ -150,7 +150,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                 }
             })).booleanValue();
     }

Modified: xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java?rev=422550&r1=422549&r2=422550&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java Sun Jul 16 15:02:55
2006
@@ -150,7 +150,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                 }
             })).booleanValue();
     }



Mime
View raw message