changeset 30:6d6e84c678bb

6658158: Mutable statics in SAAJ (findbugs) 6658163: txw2.DatatypeWriter.BUILDIN is a mutable static (findbugs) Reviewed-by: ramap
author asaha
date Tue, 10 Mar 2009 14:40:39 -0700
parents b045b9c5f23b
children f6fac2eef7ac
files src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java src/share/classes/com/sun/xml/internal/txw2/Document.java
diffstat 31 files changed, 186 insertions(+), 143 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Tue Mar 10 14:40:39 2009 -0700
@@ -54,13 +54,20 @@
  *
  */
 public class HttpSOAPConnection extends SOAPConnection {
+    
+    public static final String vmVendor = System.getProperty("java.vendor.url");
+    private static final String sunVmVendor = "http://java.sun.com/";
+    private static final String ibmVmVendor = "http://www.ibm.com/";
+    private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false;
+    private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false;
+    private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint";
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings");
 
-    public static String defaultProxyHost = null;
-    public static int defaultProxyPort = -1;
+    public static final String defaultProxyHost = null;
+    public static  final int defaultProxyPort = -1;
 
     MessageFactory messageFactory = null;
 
@@ -72,6 +79,9 @@
 
         try {
             messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
+        } catch (NoSuchMethodError ex) {
+	            //fallback to default SOAP 1.1 in this case for backward compatibility
+	            messageFactory = MessageFactory.newInstance();
         } catch (Exception ex) {
             log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex);
             throw new SOAPExceptionImpl("Unable to create message factory", ex);
@@ -95,14 +105,19 @@
             throw new SOAPExceptionImpl("Connection is closed");
         }
 
-        Class urlEndpointClass = null;
+        Class urlEndpointClass = null;       
+        ClassLoader loader = Thread.currentThread().getContextClassLoader();
 
         try {
-            urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint");
-        } catch (Exception ex) {
-            //Do nothing. URLEndpoint is available only when JAXM is there.
-            log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
-        }
+                if (loader != null) {
+	                urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
+	        } else {
+ 	                urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
+	            }
+	        } catch (ClassNotFoundException ex) {
+	            //Do nothing. URLEndpoint is available only when JAXM is there.
+	            log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
+ 	        }
 
         if (urlEndpointClass != null) {
             if (urlEndpointClass.isInstance(endPoint)) {
@@ -639,10 +654,23 @@
 
         return ret;
     }
-
-    private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
-    private static String SSL_PROVIDER =
-        "com.sun.net.ssl.internal.ssl.Provider";
+    //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
+    //private static String SSL_PROVIDER =
+	      //  "com.sun.net.ssl.internal.ssl.Provider";
+    private static final String SSL_PKG;
+    private static  final String SSL_PROVIDER;
+    
+    
+    static {    
+ 	        if (isIBMVM) {
+ 	            SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
+ 	            SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
+ 	        } else {
+ 	            //if not IBM VM default to Sun.
+ 	            SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
+ 	            SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
+ 	        }
+ 	    }
     private void initHttps() {
         //if(!setHttps) {
         String pkgs = System.getProperty("java.protocol.handler.pkgs");
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -70,7 +70,7 @@
  */
 public class AttachmentPartImpl extends AttachmentPart {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: EnvelopeFactory.java,v 1.24 2006/01/27 12:49:26 vj135062 Exp $
- * $Revision: 1.24 $
- * $Date: 2006/01/27 12:49:26 $
+ * 
+ * 
+ * 
  */
 
 
@@ -55,7 +55,7 @@
  */
 public class EnvelopeFactory {
     
-    protected static Logger
+    protected static final Logger
         log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
         "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java	Tue Mar 10 14:40:39 2009 -0700
@@ -49,7 +49,7 @@
 public class ImageDataContentHandler extends Component
     implements DataContentHandler {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: MessageFactoryImpl.java,v 1.23 2006/01/27 12:49:27 vj135062 Exp $
- * $Revision: 1.23 $
- * $Date: 2006/01/27 12:49:27 $
+ * 
+ * 
+ * 
  */
 
 
@@ -54,15 +54,15 @@
  */
 public class MessageFactoryImpl extends MessageFactory {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
 
-    protected static OutputStream listener;
+    protected  OutputStream listener;
 
     protected boolean lazyAttachments = false;
     
-    public static OutputStream listen(OutputStream newListener) {
+    public  OutputStream listen(OutputStream newListener) {
         OutputStream oldListener = listener;
         listener = newListener;
         return oldListener;
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: MessageImpl.java,v 1.5 2006/12/12 10:16:33 kumarjayanti Exp $
- * $Revision: 1.5 $
- * $Date: 2006/12/12 10:16:33 $
+ * 
+ * 
+ * 
  */
 
 
@@ -69,7 +69,7 @@
     public static final String CONTENT_ID             = "Content-ID";
     public static final String CONTENT_LOCATION       = "Content-Location";
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -37,7 +37,7 @@
 
 public class SAAJMetaFactoryImpl extends SAAJMetaFactory {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: SOAPDocumentImpl.java,v 1.15 2006/01/27 12:49:29 vj135062 Exp $
+ * 
  */
 
 
@@ -45,7 +45,7 @@
 
 public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument {
 
-    protected static Logger log =
+    protected static final  Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: SOAPFactoryImpl.java,v 1.21 2006/01/27 12:49:29 vj135062 Exp $
- * $Revision: 1.21 $
- * $Date: 2006/01/27 12:49:29 $
+ * 
+ * 
+ * 
  */
 
 
@@ -50,7 +50,7 @@
 
 public abstract class SOAPFactoryImpl extends SOAPFactory {
 
-    protected static Logger
+    protected static final Logger
         log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                                "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: SOAPPartImpl.java,v 1.1.1.1 2006/01/27 13:10:55 kumarjayanti Exp $
- * $Revision: 1.1.1.1 $
- * $Date: 2006/01/27 13:10:55 $
+ * 
+ * 
+ * 
  */
 
 
@@ -59,7 +59,7 @@
  * @author Anil Vijendran (anil@sun.com)
  */
 public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument {
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: CDATAImpl.java,v 1.19 2006/01/27 12:49:34 vj135062 Exp $
- * $Revision: 1.19 $
- * $Date: 2006/01/27 12:49:34 $
+ * 
+ * 
+ * 
  */
 
 
@@ -43,7 +43,7 @@
     extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl
     implements javax.xml.soap.Text {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: CommentImpl.java,v 1.17 2006/01/27 12:49:34 vj135062 Exp $
- * $Revision: 1.17 $
- * $Date: 2006/01/27 12:49:34 $
+ * 
+ * 
+ * 
  */
 
 
@@ -47,7 +47,7 @@
     extends com.sun.org.apache.xerces.internal.dom.CommentImpl
     implements javax.xml.soap.Text, org.w3c.dom.Comment { 
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
     protected static ResourceBundle rb =
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: ElementImpl.java,v 1.6 2006/11/16 16:01:14 kumarjayanti Exp $
- * $Revision: 1.6 $
- * $Date: 2006/11/16 16:01:14 $
+ * 
+ * 
+ * 
  */
 
 
@@ -60,7 +60,7 @@
 
     protected QName elementQName;
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: TextImpl.java,v 1.19 2006/01/27 12:49:36 vj135062 Exp $
- * $Revision: 1.19 $
- * $Date: 2006/01/27 12:49:36 $
+ * 
+ * 
+ * 
  */
 
 
@@ -43,7 +43,7 @@
     extends com.sun.org.apache.xerces.internal.dom.TextImpl
     implements javax.xml.soap.Text, org.w3c.dom.Text {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,9 +23,9 @@
  * have any questions.
  */
 /*
- * $Id: NameImpl.java,v 1.48 2006/01/27 12:49:38 vj135062 Exp $
- * $Revision: 1.48 $
- * $Date: 2006/01/27 12:49:38 $
+ * 
+ * 
+ * 
  */
 
 
@@ -63,7 +63,7 @@
     protected String prefix = "";
     private String qualifiedName = null;
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.NAMING_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.name.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Fault1_1Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $
+ * 
  */
 
 
@@ -57,7 +57,7 @@
 
 public class Fault1_1Impl extends FaultImpl {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(
             LogDomainConstants.SOAP_VER1_1_DOMAIN,
             "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Header1_1Impl.java,v 1.29 2006/01/27 12:49:41 vj135062 Exp $
+ * 
  */
 
 
@@ -50,7 +50,7 @@
 
 public class Header1_1Impl extends HeaderImpl {
     
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
         
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: HeaderElement1_1Impl.java,v 1.29 2006/01/27 12:49:41 vj135062 Exp $
+ * 
  */
 
 
@@ -49,7 +49,7 @@
 
 public class HeaderElement1_1Impl extends HeaderElementImpl {
     
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Message1_1Impl.java,v 1.24 2006/01/27 12:49:41 vj135062 Exp $
+ * 
  */
 
 
@@ -48,7 +48,7 @@
 
 public class Message1_1Impl extends MessageImpl implements SOAPConstants {
     
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
    
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: SOAPPart1_1Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $
+ * 
  */
 
 
@@ -48,7 +48,7 @@
 
 public class SOAPPart1_1Impl extends SOAPPartImpl implements SOAPConstants {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Body1_2Impl.java,v 1.32 2006/01/27 12:49:44 vj135062 Exp $
+ * 
  */
 
 
@@ -50,7 +50,7 @@
 
 public class Body1_2Impl extends BodyImpl {
     
-    protected static Logger log =
+    protected static  final Logger log =
         Logger.getLogger(Body1_2Impl.class.getName(),
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Detail1_2Impl.java,v 1.24 2006/01/27 12:49:45 vj135062 Exp $
+ * 
  */
 
 
@@ -47,7 +47,7 @@
 
 public class Detail1_2Impl extends DetailImpl {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(Detail1_2Impl.class.getName(),
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Envelope1_2Impl.java,v 1.26 2006/01/27 12:49:47 vj135062 Exp $
+ * 
  */
 
 
@@ -47,7 +47,7 @@
 
 public class Envelope1_2Impl extends EnvelopeImpl {
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(Envelope1_2Impl.class.getName(),
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Fault1_2Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $
+ * 
  */
 
 
@@ -51,7 +51,7 @@
 
 public class Fault1_2Impl extends FaultImpl {
         
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(
             LogDomainConstants.SOAP_VER1_2_DOMAIN,
             "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: Header1_2Impl.java,v 1.36 2006/01/27 12:49:48 vj135062 Exp $
+ * 
  */
 
 
@@ -53,7 +53,7 @@
 
 public class Header1_2Impl extends HeaderImpl {
     
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(
             LogDomainConstants.SOAP_VER1_2_DOMAIN,
             "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: HeaderElement1_2Impl.java,v 1.29 2006/01/27 12:49:48 vj135062 Exp $
+ * 
  */
 
 
@@ -47,7 +47,7 @@
 
 public class HeaderElement1_2Impl extends HeaderElementImpl {
 
-    private static Logger log =
+    private static final Logger log =
         Logger.getLogger(HeaderElement1_2Impl.class.getName(),
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
        
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java	Tue Mar 10 14:40:39 2009 -0700
@@ -23,7 +23,7 @@
  * have any questions.
  */
 /*
- * $Id: SOAPPart1_2Impl.java,v 1.1.1.1 2006/01/27 13:10:57 kumarjayanti Exp $
+ * 
  */
 
 
@@ -47,7 +47,7 @@
 
 public class SOAPPart1_2Impl extends SOAPPartImpl implements SOAPConstants{
 
-    protected static Logger log =
+    protected static final Logger log =
         Logger.getLogger(SOAPPart1_2Impl.class.getName(),
                          "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
 
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java	Tue Mar 10 14:40:39 2009 -0700
@@ -45,12 +45,12 @@
  * because they are not legal in SOAP.  If the user of this class sets a
  * LexicalHandler, then it forwards events to that handler.
  *
- * $Id: RejectDoctypeSaxFilter.java,v 1.13 2006/01/27 12:49:52 vj135062 Exp $
+ * 
  * @author Edwin Goei
  */
 
 public class RejectDoctypeSaxFilter extends XMLFilterImpl implements XMLReader, LexicalHandler{
-    protected static Logger log =
+    protected static final Logger log =
     Logger.getLogger(LogDomainConstants.UTIL_DOMAIN,
     "com.sun.xml.internal.messaging.saaj.util.LocalStrings");
     
--- a/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java	Tue Mar 10 14:40:39 2009 -0700
@@ -62,20 +62,22 @@
 public class EfficientStreamingTransformer
     extends javax.xml.transform.Transformer {
 
-  static final String version;
-  static final String vendor;
+  //static final String version;
+  //static final String vendor;
 
-  protected static TransformerFactory transformerFactory = TransformerFactory.newInstance();
+  protected static final TransformerFactory transformerFactory = TransformerFactory.newInstance();
 
-  static {
-        version = System.getProperty("java.vm.version");
-        vendor = System.getProperty("java.vm.vendor");
-        if (vendor.startsWith("Sun") && 
-            (version.startsWith("1.4") || version.startsWith("1.3"))) {
-            transformerFactory = 
-                new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl();
-        }
-  }
+   //removing support for Java 1.4 and 1.3 : CR6658158
+    /*static {
+    version = System.getProperty("java.vm.version");
+    vendor = System.getProperty("java.vm.vendor");
+    if (vendor.startsWith("Sun") && 
+    (version.startsWith("1.4") || version.startsWith("1.3"))) {
+    transformerFactory = 
+    new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl();
+    }
+}
+*/
                                                                                                                                                   
     /**
      * TransformerFactory instance.
--- a/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java	Tue Mar 10 14:40:39 2009 -0700
@@ -25,6 +25,9 @@
 
 package com.sun.xml.internal.txw2;
 
+import java.util.AbstractList;
+import java.util.Collections;
+import java.util.List;
 import javax.xml.namespace.QName;
 
 /**
@@ -53,50 +56,60 @@
      */
     void print(DT dt, NamespaceResolver resolver, StringBuilder buf);
 
+    static final List<DatatypeWriter<?>> BUILTIN = Collections.unmodifiableList(new AbstractList() {
+        
+        private DatatypeWriter<?>[] BUILTIN_ARRAY = new DatatypeWriter<?>[] {
+            new DatatypeWriter<String>() {
+                public Class<String> getType() {
+                    return String.class;
+                }
+                public void print(String s, NamespaceResolver resolver, StringBuilder buf) {
+                    buf.append(s);
+                }
+            },
+            new DatatypeWriter<Integer>() {
+                public Class<Integer> getType() {
+                    return Integer.class;
+                }
+                public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) {
+                    buf.append(i);
+                }
+            },
+            new DatatypeWriter<Float>() {
+                public Class<Float> getType() {
+                    return Float.class;
+                }
+                public void print(Float f, NamespaceResolver resolver, StringBuilder buf) {
+                    buf.append(f);
+                }
+            },
+            new DatatypeWriter<Double>() {
+                public Class<Double> getType() {
+                    return Double.class;
+                }
+                public void print(Double d, NamespaceResolver resolver, StringBuilder buf) {
+                    buf.append(d);
+                }
+            },
+            new DatatypeWriter<QName>() {
+                public Class<QName> getType() {
+                    return QName.class;
+                }
+                public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) {
+                    String p = resolver.getPrefix(qn.getNamespaceURI());
+                    if(p.length()!=0)
+                        buf.append(p).append(':');
+                    buf.append(qn.getLocalPart());
+                }
+            }
+        };
+                
+        public DatatypeWriter<?> get(int n) { 
+          return BUILTIN_ARRAY[n];
+        }
 
-    static final DatatypeWriter<?>[] BUILDIN = new DatatypeWriter<?>[] {
-        new DatatypeWriter<String>() {
-            public Class<String> getType() {
-                return String.class;
-            }
-            public void print(String s, NamespaceResolver resolver, StringBuilder buf) {
-                buf.append(s);
-            }
-        },
-        new DatatypeWriter<Integer>() {
-            public Class<Integer> getType() {
-                return Integer.class;
-            }
-            public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) {
-                buf.append(i);
-            }
-        },
-        new DatatypeWriter<Float>() {
-            public Class<Float> getType() {
-                return Float.class;
-            }
-            public void print(Float f, NamespaceResolver resolver, StringBuilder buf) {
-                buf.append(f);
-            }
-        },
-        new DatatypeWriter<Double>() {
-            public Class<Double> getType() {
-                return Double.class;
-            }
-            public void print(Double d, NamespaceResolver resolver, StringBuilder buf) {
-                buf.append(d);
-            }
-        },
-        new DatatypeWriter<QName>() {
-            public Class<QName> getType() {
-                return QName.class;
-            }
-            public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) {
-                String p = resolver.getPrefix(qn.getNamespaceURI());
-                if(p.length()!=0)
-                    buf.append(p).append(':');
-                buf.append(qn.getLocalPart());
-            }
+        public int size() {
+          return BUILTIN_ARRAY.length;
         }
-    };
+      });
 }
--- a/src/share/classes/com/sun/xml/internal/txw2/Document.java	Thu Mar 05 16:58:37 2009 -0800
+++ b/src/share/classes/com/sun/xml/internal/txw2/Document.java	Tue Mar 10 14:40:39 2009 -0700
@@ -76,7 +76,7 @@
 
     Document(XmlSerializer out) {
         this.out = out;
-        for( DatatypeWriter dw : DatatypeWriter.BUILDIN )
+        for( DatatypeWriter dw : DatatypeWriter.BUILTIN )
             datatypeWriters.put(dw.getType(),dw);
     }