Author: mrglavas
Date: Sun Jul 16 14:45:58 2006
New Revision: 422544

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

Modified:
    xerces/java/trunk/src/org/apache/html/dom/SecuritySupport.java
    xerces/java/trunk/src/org/apache/xerces/dom/SecuritySupport.java
    xerces/java/trunk/src/org/apache/xerces/impl/dv/SecuritySupport.java
    xerces/java/trunk/src/org/apache/xerces/parsers/SecuritySupport.java
    xerces/java/trunk/src/org/apache/xerces/xinclude/SecuritySupport.java
    xerces/java/trunk/src/org/apache/xml/serialize/SecuritySupport.java

Modified: xerces/java/trunk/src/org/apache/html/dom/SecuritySupport.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/html/dom/SecuritySupport.java?rev=422544&r1=422543&r2=422544&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/html/dom/SecuritySupport.java (original)
+++ xerces/java/trunk/src/org/apache/html/dom/SecuritySupport.java Sun Jul 16 
14:45:58 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
+ * Copyright 2002,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.
@@ -130,7 +130,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                     }
                 })).booleanValue();
     }

Modified: xerces/java/trunk/src/org/apache/xerces/dom/SecuritySupport.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/SecuritySupport.java?rev=422544&r1=422543&r2=422544&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/dom/SecuritySupport.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/dom/SecuritySupport.java Sun Jul 16 
14:45:58 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
+ * Copyright 2002,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.
@@ -130,7 +130,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                     }
                 })).booleanValue();
     }

Modified: xerces/java/trunk/src/org/apache/xerces/impl/dv/SecuritySupport.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/dv/SecuritySupport.java?rev=422544&r1=422543&r2=422544&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/dv/SecuritySupport.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/dv/SecuritySupport.java Sun 
Jul 16 14:45:58 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
+ * Copyright 2002,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.
@@ -130,7 +130,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                     }
                 })).booleanValue();
     }

Modified: xerces/java/trunk/src/org/apache/xerces/parsers/SecuritySupport.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/parsers/SecuritySupport.java?rev=422544&r1=422543&r2=422544&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/parsers/SecuritySupport.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/parsers/SecuritySupport.java Sun 
Jul 16 14:45:58 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
+ * Copyright 2002,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.
@@ -130,7 +130,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                     }
                 })).booleanValue();
     }

Modified: xerces/java/trunk/src/org/apache/xerces/xinclude/SecuritySupport.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/xinclude/SecuritySupport.java?rev=422544&r1=422543&r2=422544&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/xinclude/SecuritySupport.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/xinclude/SecuritySupport.java Sun 
Jul 16 14:45:58 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
+ * Copyright 2002,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.
@@ -130,7 +130,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                     }
                 })).booleanValue();
     }

Modified: xerces/java/trunk/src/org/apache/xml/serialize/SecuritySupport.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xml/serialize/SecuritySupport.java?rev=422544&r1=422543&r2=422544&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xml/serialize/SecuritySupport.java 
(original)
+++ xerces/java/trunk/src/org/apache/xml/serialize/SecuritySupport.java Sun Jul 
16 14:45:58 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
+ * Copyright 2002,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.
@@ -130,7 +130,7 @@
         return ((Boolean)
                 AccessController.doPrivileged(new PrivilegedAction() {
                     public Object run() {
-                        return new Boolean(f.exists());
+                        return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                     }
                 })).booleanValue();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to