You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by mr...@apache.org on 2006/07/17 00:08:54 UTC

svn commit: r422554 - in /xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml: parsers/SecuritySupport.java parsers/SecuritySupport12.java transform/SecuritySupport.java transform/SecuritySupport12.java

Author: mrglavas
Date: Sun Jul 16 15:08:54 2006
New Revision: 422554

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

Modified:
    xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport.java
    xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport12.java
    xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport.java
    xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport12.java

Modified: xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport.java?rev=422554&r1=422553&r2=422554&view=diff
==============================================================================
--- xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport.java (original)
+++ xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport.java Sun Jul 16 15:08:54 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.
@@ -16,9 +16,10 @@
 
 package javax.xml.parsers;
 
-import java.lang.reflect.*;
-import java.net.*;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
 
 /**
  * This class is duplicated for each JAXP subpackage so keep it in sync.

Modified: xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport12.java
URL: http://svn.apache.org/viewvc/xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport12.java?rev=422554&r1=422553&r2=422554&view=diff
==============================================================================
--- xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport12.java (original)
+++ xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/parsers/SecuritySupport12.java Sun Jul 16 15:08:54 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.
@@ -16,10 +16,14 @@
 
 package javax.xml.parsers;
 
-import java.security.*;
-import java.net.*;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 
 /**
  * This class is duplicated for each JAXP subpackage so keep it in sync.
@@ -88,7 +92,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/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport.java?rev=422554&r1=422553&r2=422554&view=diff
==============================================================================
--- xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport.java (original)
+++ xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport.java Sun Jul 16 15:08:54 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.
@@ -16,9 +16,10 @@
 
 package javax.xml.transform;
 
-import java.lang.reflect.*;
-import java.net.*;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
 
 /**
  * This class is duplicated for each JAXP subpackage so keep it in sync.

Modified: xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport12.java
URL: http://svn.apache.org/viewvc/xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport12.java?rev=422554&r1=422553&r2=422554&view=diff
==============================================================================
--- xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport12.java (original)
+++ xml/commons/branches/tck-jaxp-1_2_0/java/external/src/javax/xml/transform/SecuritySupport12.java Sun Jul 16 15:08:54 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.
@@ -16,10 +16,14 @@
 
 package javax.xml.transform;
 
-import java.security.*;
-import java.net.*;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 
 /**
  * This class is duplicated for each JAXP subpackage so keep it in sync.
@@ -88,7 +92,7 @@
     return ((Boolean)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    return new Boolean(f.exists());
+                    return f.exists() ? Boolean.TRUE : Boolean.FALSE;
                 }
             })).booleanValue();
     }