6658158: Mutable statics in SAAJ (findbugs)
authortbell
Mon, 04 May 2009 21:10:41 -0700
changeset 2719 99d59312294b
parent 2679 1d6ff0427a13
child 2720 2c677d453222
6658158: Mutable statics in SAAJ (findbugs) 6658163: txw2.DatatypeWriter.BUILDIN is a mutable static (findbugs) Reviewed-by: darcy
jaxws/src/share/classes/com/sun/codemodel/internal/JClassContainer.java
jaxws/src/share/classes/com/sun/codemodel/internal/JDefinedClass.java
jaxws/src/share/classes/com/sun/codemodel/internal/JForEach.java
jaxws/src/share/classes/com/sun/codemodel/internal/JMethod.java
jaxws/src/share/classes/com/sun/codemodel/internal/JMods.java
jaxws/src/share/classes/com/sun/codemodel/internal/util/SingleByteEncoder.java
jaxws/src/share/classes/com/sun/codemodel/internal/util/Surrogate.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java
jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java
jaxws/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java
jaxws/src/share/classes/com/sun/xml/internal/txw2/Document.java
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/JClassContainer.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/JClassContainer.java	Mon May 04 21:10:41 2009 -0700
@@ -145,6 +145,7 @@
      *      newly created Annotation Type Declaration
      * @exception JClassAlreadyExistsException
      *      When the specified class/interface was already created.
+
      */
     public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException;
 
@@ -156,6 +157,7 @@
      *      newly created Enum
      * @exception JClassAlreadyExistsException
      *      When the specified class/interface was already created.
+
      */
     public JDefinedClass _enum (String name) throws JClassAlreadyExistsException;
 
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/JDefinedClass.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/JDefinedClass.java	Mon May 04 21:10:41 2009 -0700
@@ -428,6 +428,7 @@
      *      newly created Annotation Type Declaration
      * @exception JClassAlreadyExistsException
      *      When the specified class/interface was already created.
+
      */
     public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
         return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/JForEach.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/JForEach.java	Mon May 04 21:10:41 2009 -0700
@@ -33,17 +33,17 @@
  */
 public final class JForEach implements JStatement {
 
-    private final JType type;
-    private final String var;
-    private JBlock body = null; // lazily created
-    private final JExpression collection;
+        private final JType type;
+        private final String var;
+        private JBlock body = null; // lazily created
+        private final JExpression collection;
     private final JVar loopVar;
 
-    public JForEach(JType vartype, String variable, JExpression collection) {
+        public JForEach(JType vartype, String variable, JExpression collection) {
 
-        this.type = vartype;
-        this.var = variable;
-        this.collection = collection;
+                this.type = vartype;
+                this.var = variable;
+                this.collection = collection;
         loopVar = new JVar(JMods.forVar(JMod.NONE), type, var, collection);
     }
 
@@ -51,24 +51,24 @@
     /**
      * Returns a reference to the loop variable.
      */
-    public JVar var() {
-        return loopVar;
-    }
+        public JVar var() {
+                return loopVar;
+        }
 
-    public JBlock body() {
-        if (body == null)
-            body = new JBlock();
-        return body;
-    }
+        public JBlock body() {
+                if (body == null)
+                        body = new JBlock();
+                return body;
+        }
 
-    public void state(JFormatter f) {
-        f.p("for (");
-        f.g(type).id(var).p(": ").g(collection);
-        f.p(')');
-        if (body != null)
-            f.g(body).nl();
-        else
-            f.p(';').nl();
-    }
+        public void state(JFormatter f) {
+                f.p("for (");
+                f.g(type).id(var).p(": ").g(collection);
+                f.p(')');
+                if (body != null)
+                        f.g(body).nl();
+                else
+                        f.p(';').nl();
+        }
 
 }
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/JMethod.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/JMethod.java	Mon May 04 21:10:41 2009 -0700
@@ -38,49 +38,49 @@
  */
 public class JMethod extends JGenerifiableImpl implements JDeclaration, JAnnotatable {
 
-    /**
-     * Modifiers for this method
-     */
-    private JMods mods;
+        /**
+         * Modifiers for this method
+         */
+        private JMods mods;
 
-    /**
-     * Return type for this method
-     */
-    private JType type = null;
+        /**
+         * Return type for this method
+         */
+        private JType type = null;
 
-    /**
-     * Name of this method
-     */
-    private String name = null;
+        /**
+         * Name of this method
+         */
+        private String name = null;
 
-    /**
-     * List of parameters for this method's declaration
-     */
-    private final List<JVar> params = new ArrayList<JVar>();
+        /**
+         * List of parameters for this method's declaration
+         */
+        private final List<JVar> params = new ArrayList<JVar>();
 
-    /**
-     * Set of exceptions that this method may throw.
+        /**
+         * Set of exceptions that this method may throw.
      * A set instance lazily created.
-     */
-    private Set<JClass> _throws;
+         */
+        private Set<JClass> _throws;
 
-    /**
-     * JBlock of statements that makes up the body this method
-     */
-    private JBlock body = null;
+        /**
+         * JBlock of statements that makes up the body this method
+         */
+        private JBlock body = null;
 
-    private JDefinedClass outer;
+        private JDefinedClass outer;
 
-    /**
-     * javadoc comments for this JMethod
-     */
-    private JDocComment jdoc = null;
+        /**
+         * javadoc comments for this JMethod
+         */
+        private JDocComment jdoc = null;
 
-    /**
-     * Variable parameter for this method's varargs declaration
-     * introduced in J2SE 1.5
-     */
-    private JVar varParam = null;
+        /**
+         * Variable parameter for this method's varargs declaration
+         * introduced in J2SE 1.5
+         */
+        private JVar varParam = null;
 
     /**
      * Annotations on this variable. Lazily created.
@@ -88,9 +88,9 @@
     private List<JAnnotationUse> annotations = null;
 
 
-    private boolean isConstructor() {
-        return type == null;
-    }
+        private boolean isConstructor() {
+                return type == null;
+        }
 
     /** To set the default value for the
      *  annotation member
@@ -98,40 +98,40 @@
     private JExpression defaultValue = null;
 
 
-    /**
-     * JMethod constructor
-     *
-     * @param mods
-     *        Modifiers for this method's declaration
-     *
-     * @param type
-     *        Return type for the method
-     *
-     * @param name
-     *        Name of this method
-     */
-    JMethod(JDefinedClass outer, int mods, JType type, String name) {
-        this.mods = JMods.forMethod(mods);
-        this.type = type;
-        this.name = name;
-        this.outer = outer;
-    }
+        /**
+         * JMethod constructor
+         *
+         * @param mods
+         *        Modifiers for this method's declaration
+         *
+         * @param type
+         *        Return type for the method
+         *
+         * @param name
+         *        Name of this method
+         */
+        JMethod(JDefinedClass outer, int mods, JType type, String name) {
+                this.mods = JMods.forMethod(mods);
+                this.type = type;
+                this.name = name;
+                this.outer = outer;
+        }
 
-    /**
-     * Constructor constructor
-     *
-     * @param mods
-     *        Modifiers for this constructor's declaration
-     *
-     * @param _class
-     *        JClass containing this constructor
-     */
-    JMethod(int mods, JDefinedClass _class) {
-        this.mods = JMods.forMethod(mods);
-        this.type = null;
-        this.name = _class.name();
-        this.outer = _class;
-    }
+        /**
+         * Constructor constructor
+         *
+         * @param mods
+         *        Modifiers for this constructor's declaration
+         *
+         * @param _class
+         *        JClass containing this constructor
+         */
+        JMethod(int mods, JDefinedClass _class) {
+                this.mods = JMods.forMethod(mods);
+                this.type = null;
+                this.name = _class.name();
+                this.outer = _class;
+        }
 
     private Set<JClass> getThrows() {
         if(_throws==null)
@@ -139,56 +139,56 @@
         return _throws;
     }
 
-    /**
-     * Add an exception to the list of exceptions that this
-     * method may throw.
-     *
-     * @param exception
-     *        Name of an exception that this method may throw
-     */
-    public JMethod _throws(JClass exception) {
+        /**
+         * Add an exception to the list of exceptions that this
+         * method may throw.
+         *
+         * @param exception
+         *        Name of an exception that this method may throw
+         */
+        public JMethod _throws(JClass exception) {
         getThrows().add(exception);
-        return this;
-    }
+                return this;
+        }
 
-    public JMethod _throws(Class exception) {
-        return _throws(outer.owner().ref(exception));
-    }
+        public JMethod _throws(Class exception) {
+                return _throws(outer.owner().ref(exception));
+        }
 
-    /**
-     * Add the specified variable to the list of parameters
-     * for this method signature.
-     *
-     * @param type
-     *        JType of the parameter being added
-     *
-     * @param name
-     *        Name of the parameter being added
-     *
-     * @return New parameter variable
-     */
-    public JVar param(int mods, JType type, String name) {
-        JVar v = new JVar(JMods.forVar(mods), type, name, null);
-        params.add(v);
-        return v;
-    }
+        /**
+         * Add the specified variable to the list of parameters
+         * for this method signature.
+         *
+         * @param type
+         *        JType of the parameter being added
+         *
+         * @param name
+         *        Name of the parameter being added
+         *
+         * @return New parameter variable
+         */
+        public JVar param(int mods, JType type, String name) {
+                JVar v = new JVar(JMods.forVar(mods), type, name, null);
+                params.add(v);
+                return v;
+        }
 
-    public JVar param(JType type, String name) {
-        return param(JMod.NONE, type, name);
-    }
+        public JVar param(JType type, String name) {
+                return param(JMod.NONE, type, name);
+        }
 
-    public JVar param(int mods, Class type, String name) {
-        return param(mods, outer.owner()._ref(type), name);
-    }
+        public JVar param(int mods, Class type, String name) {
+                return param(mods, outer.owner()._ref(type), name);
+        }
 
-    public JVar param(Class type, String name) {
-        return param(outer.owner()._ref(type), name);
-    }
+        public JVar param(Class type, String name) {
+                return param(outer.owner()._ref(type), name);
+        }
 
-    /**
-     * @see #varParam(JType, String)
-     */
-    public JVar varParam(Class type, String name) {
+        /**
+         * @see #varParam(JType, String)
+         */
+        public JVar varParam(Class type, String name) {
         return varParam(outer.owner()._ref(type),name);
     }
 
@@ -210,25 +210,25 @@
      *      method signature.
      */
     public JVar varParam(JType type, String name) {
-        if (!hasVarArgs()) {
+                if (!hasVarArgs()) {
 
             varParam =
-                new JVar(
-                    JMods.forVar(JMod.NONE),
-                    type.array(),
-                    name,
-                    null);
-            return varParam;
-        } else {
-            throw new IllegalStateException(
-                "Cannot have two varargs in a method,\n"
-                    + "Check if varParam method of JMethod is"
-                    + " invoked more than once");
+                                new JVar(
+                                        JMods.forVar(JMod.NONE),
+                                        type.array(),
+                                        name,
+                                        null);
+                        return varParam;
+                } else {
+                        throw new IllegalStateException(
+                                "Cannot have two varargs in a method,\n"
+                                        + "Check if varParam method of JMethod is"
+                                        + " invoked more than once");
+
+                }
 
         }
 
-    }
-
     /**
      * Adds an annotation to this variable.
      * @param clazz
@@ -256,17 +256,17 @@
         return TypedAnnotationWriter.create(clazz,this);
     }
 
-    /**
-     * Check if there are any varargs declared
-     * for this method signature.
-     */
-    public boolean hasVarArgs() {
-        return this.varParam!=null;
-    }
+        /**
+         * Check if there are any varargs declared
+         * for this method signature.
+         */
+        public boolean hasVarArgs() {
+                return this.varParam!=null;
+        }
 
-    public String name() {
-        return name;
-    }
+        public String name() {
+                return name;
+        }
 
     /**
      * Changes the name of the method.
@@ -276,11 +276,11 @@
     }
 
     /**
-     * Returns the return type.
-     */
-    public JType type() {
-        return type;
-    }
+         * Returns the return type.
+         */
+        public JType type() {
+                return type;
+        }
 
     /**
      * Overrides the return type.
@@ -290,72 +290,72 @@
     }
 
     /**
-     * Returns all the parameter types in an array.
-     * @return
-     *      If there's no parameter, an empty array will be returned.
-     */
-    public JType[] listParamTypes() {
-        JType[] r = new JType[params.size()];
-        for (int i = 0; i < r.length; i++)
-            r[i] = params.get(i).type();
-        return r;
-    }
+         * Returns all the parameter types in an array.
+         * @return
+         *      If there's no parameter, an empty array will be returned.
+         */
+        public JType[] listParamTypes() {
+                JType[] r = new JType[params.size()];
+                for (int i = 0; i < r.length; i++)
+                        r[i] = params.get(i).type();
+                return r;
+        }
 
-    /**
-     * Returns  the varags parameter type.
-     * @return
-     * If there's no vararg parameter type, null will be returned.
-     */
-    public JType listVarParamType() {
-        if (varParam != null)
-            return varParam.type();
-        else
-            return null;
-    }
+        /**
+         * Returns  the varags parameter type.
+         * @return
+         * If there's no vararg parameter type, null will be returned.
+         */
+        public JType listVarParamType() {
+                if (varParam != null)
+                        return varParam.type();
+                else
+                        return null;
+        }
 
-    /**
-     * Returns all the parameters in an array.
-     * @return
-     *      If there's no parameter, an empty array will be returned.
-     */
-    public JVar[] listParams() {
-        return params.toArray(new JVar[params.size()]);
-    }
+        /**
+         * Returns all the parameters in an array.
+         * @return
+         *      If there's no parameter, an empty array will be returned.
+         */
+        public JVar[] listParams() {
+                return params.toArray(new JVar[params.size()]);
+        }
 
-    /**
-     * Returns the variable parameter
-     * @return
-     *      If there's no parameter, null will be returned.
-     */
-    public JVar listVarParam() {
-        return varParam;
-    }
+        /**
+         * Returns the variable parameter
+         * @return
+         *      If there's no parameter, null will be returned.
+         */
+        public JVar listVarParam() {
+                return varParam;
+        }
 
-    /**
-     * Returns true if the method has the specified signature.
-     */
-    public boolean hasSignature(JType[] argTypes) {
-        JVar[] p = listParams();
-        if (p.length != argTypes.length)
-            return false;
+        /**
+         * Returns true if the method has the specified signature.
+         */
+        public boolean hasSignature(JType[] argTypes) {
+                JVar[] p = listParams();
+                if (p.length != argTypes.length)
+                        return false;
 
-        for (int i = 0; i < p.length; i++)
-            if (!p[i].type().equals(argTypes[i]))
-                return false;
+                for (int i = 0; i < p.length; i++)
+                        if (!p[i].type().equals(argTypes[i]))
+                                return false;
 
-        return true;
-    }
+                return true;
+        }
 
-    /**
-     * Get the block that makes up body of this method
-     *
-     * @return Body of method
-     */
-    public JBlock body() {
-        if (body == null)
-            body = new JBlock();
-        return body;
-    }
+        /**
+         * Get the block that makes up body of this method
+         *
+         * @return Body of method
+         */
+        public JBlock body() {
+                if (body == null)
+                        body = new JBlock();
+                return body;
+        }
 
     /**
      * Specify the default value for this annotation member
@@ -367,37 +367,37 @@
         this.defaultValue = value;
     }
 
-    /**
-     * Creates, if necessary, and returns the class javadoc for this
-     * JDefinedClass
-     *
-     * @return JDocComment containing javadocs for this class
-     */
-    public JDocComment javadoc() {
-        if (jdoc == null)
-            jdoc = new JDocComment(owner());
-        return jdoc;
-    }
+        /**
+         * Creates, if necessary, and returns the class javadoc for this
+         * JDefinedClass
+         *
+         * @return JDocComment containing javadocs for this class
+         */
+        public JDocComment javadoc() {
+                if (jdoc == null)
+                        jdoc = new JDocComment(owner());
+                return jdoc;
+        }
 
-    public void declare(JFormatter f) {
-        if (jdoc != null)
-            f.g(jdoc);
+        public void declare(JFormatter f) {
+                if (jdoc != null)
+                        f.g(jdoc);
 
         if (annotations != null){
             for (JAnnotationUse a : annotations)
                 f.g(a).nl();
         }
 
-        // declare the generics parameters
-        super.declare(f);
+                // declare the generics parameters
+                super.declare(f);
 
-        f.g(mods);
-        if (!isConstructor())
-            f.g(type);
-        f.id(name).p('(').i();
+                f.g(mods);
+                if (!isConstructor())
+                        f.g(type);
+                f.id(name).p('(').i();
         // when parameters are printed in new lines, we want them to be indented.
         // there's a good chance no newlines happen, too, but just in case it does.
-        boolean first = true;
+                boolean first = true;
         for (JVar var : params) {
             if (!first)
                 f.p(',');
@@ -406,33 +406,33 @@
             f.b(var);
             first = false;
         }
-        if (hasVarArgs()) {
-            if (!first)
-                f.p(',');
-            f.g(varParam.type().elementType());
-            f.p("... ");
-            f.id(varParam.name());
-        }
+                if (hasVarArgs()) {
+                        if (!first)
+                                f.p(',');
+                        f.g(varParam.type().elementType());
+                        f.p("... ");
+                        f.id(varParam.name());
+                }
 
-        f.o().p(')');
-        if (_throws!=null && !_throws.isEmpty()) {
-            f.nl().i().p("throws").g(_throws).nl().o();
-        }
+                f.o().p(')');
+                if (_throws!=null && !_throws.isEmpty()) {
+                        f.nl().i().p("throws").g(_throws).nl().o();
+                }
 
         if (defaultValue != null) {
             f.p("default ");
             f.g(defaultValue);
         }
-        if (body != null) {
-            f.s(body);
-        } else if (
-            !outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract() && !mods.isNative()) {
-            // Print an empty body for non-native, non-abstract methods
-            f.s(new JBlock());
-        } else {
-            f.p(';').nl();
+                if (body != null) {
+                        f.s(body);
+                } else if (
+                        !outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract() && !mods.isNative()) {
+                        // Print an empty body for non-native, non-abstract methods
+                        f.s(new JBlock());
+                } else {
+                        f.p(';').nl();
+                }
         }
-    }
 
     /**
      * @return
@@ -447,10 +447,10 @@
      * @deprecated use {@link #mods()}
      */
     public JMods getMods() {
-        return mods;
-    }
+                return mods;
+        }
 
-    protected JCodeModel owner() {
-        return outer.owner();
-    }
+        protected JCodeModel owner() {
+                return outer.owner();
+        }
 }
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/JMods.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/JMods.java	Mon May 04 21:10:41 2009 -0700
@@ -41,17 +41,17 @@
         = JMod.FINAL;
 
     private static int FIELD
-    = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED
-       | JMod.STATIC | JMod.FINAL
-       | JMod.TRANSIENT | JMod.VOLATILE);
+        = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED
+           | JMod.STATIC | JMod.FINAL
+           | JMod.TRANSIENT | JMod.VOLATILE);
 
     private static int METHOD
-    = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED | JMod.FINAL
-       | JMod.ABSTRACT | JMod.STATIC | JMod.NATIVE | JMod.SYNCHRONIZED);
+        = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED | JMod.FINAL
+           | JMod.ABSTRACT | JMod.STATIC | JMod.NATIVE | JMod.SYNCHRONIZED);
 
     private static int CLASS
-    = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED
-       | JMod.STATIC | JMod.FINAL | JMod.ABSTRACT );
+        = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED
+           | JMod.STATIC | JMod.FINAL | JMod.ABSTRACT );
 
     private static int INTERFACE = JMod.PUBLIC;
 
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/util/SingleByteEncoder.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/util/SingleByteEncoder.java	Mon May 04 21:10:41 2009 -0700
@@ -24,7 +24,7 @@
  */
 
 /*
- * @(#)SingleByteEncoder.java       1.14 03/01/23
+ * @(#)SingleByteEncoder.java   1.14 03/01/23
  */
 
 package com.sun.codemodel.internal.util;
@@ -51,109 +51,109 @@
     private final Surrogate.Parser sgp = new Surrogate.Parser();
 
     protected SingleByteEncoder(Charset cs,
-                            short[] index1, String index2,
-                            int mask1, int mask2, int shift)
+                                short[] index1, String index2,
+                                int mask1, int mask2, int shift)
     {
-       super(cs, 1.0f, 1.0f);
-       this.index1 = index1;
-       this.index2 = index2;
-       this.mask1 = mask1;
-       this.mask2 = mask2;
-       this.shift = shift;
+        super(cs, 1.0f, 1.0f);
+        this.index1 = index1;
+        this.index2 = index2;
+        this.mask1 = mask1;
+        this.mask2 = mask2;
+        this.shift = shift;
     }
 
     public boolean canEncode(char c) {
-       char testEncode;
-       testEncode = index2.charAt(index1[(c & mask1) >> shift]
-                               + (c & mask2));
-       if (testEncode == '\u0000')
-           return false;
-       else
-           return true;
+        char testEncode;
+        testEncode = index2.charAt(index1[(c & mask1) >> shift]
+                                   + (c & mask2));
+        if (testEncode == '\u0000')
+            return false;
+        else
+            return true;
     }
 
     private CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst) {
-       char[] sa = src.array();
-       int sp = src.arrayOffset() + src.position();
-       int sl = src.arrayOffset() + src.limit();
-       sp = (sp <= sl ? sp : sl);
-       byte[] da = dst.array();
-       int dp = dst.arrayOffset() + dst.position();
-       int dl = dst.arrayOffset() + dst.limit();
-       dp = (dp <= dl ? dp : dl);
+        char[] sa = src.array();
+        int sp = src.arrayOffset() + src.position();
+        int sl = src.arrayOffset() + src.limit();
+        sp = (sp <= sl ? sp : sl);
+        byte[] da = dst.array();
+        int dp = dst.arrayOffset() + dst.position();
+        int dl = dst.arrayOffset() + dst.limit();
+        dp = (dp <= dl ? dp : dl);
 
-       try {
-           while (sp < sl) {
-              char c = sa[sp];
-              if (Surrogate.is(c)) {
-                  if (sgp.parse(c, sa, sp, sl) < 0)
-                     return sgp.error();
-                  return sgp.unmappableResult();
-              }
-              if (c >= '\uFFFE')
-                  return CoderResult.unmappableForLength(1);
-              if (dl - dp < 1)
-                  return CoderResult.OVERFLOW;
+        try {
+            while (sp < sl) {
+                char c = sa[sp];
+                if (Surrogate.is(c)) {
+                    if (sgp.parse(c, sa, sp, sl) < 0)
+                        return sgp.error();
+                    return sgp.unmappableResult();
+                }
+                if (c >= '\uFFFE')
+                    return CoderResult.unmappableForLength(1);
+                if (dl - dp < 1)
+                    return CoderResult.OVERFLOW;
 
-              char e = index2.charAt(index1[(c & mask1) >> shift]
-                                   + (c & mask2));
+                char e = index2.charAt(index1[(c & mask1) >> shift]
+                                       + (c & mask2));
 
-              // If output byte is zero because input char is zero
-              // then character is mappable, o.w. fail
-              if (e == '\u0000' && c != '\u0000')
-                  return CoderResult.unmappableForLength(1);
+                // If output byte is zero because input char is zero
+                // then character is mappable, o.w. fail
+                if (e == '\u0000' && c != '\u0000')
+                    return CoderResult.unmappableForLength(1);
 
-              sp++;
-              da[dp++] = (byte)e;
-           }
-           return CoderResult.UNDERFLOW;
-       } finally {
-           src.position(sp - src.arrayOffset());
-           dst.position(dp - dst.arrayOffset());
-       }
+                sp++;
+                da[dp++] = (byte)e;
+            }
+            return CoderResult.UNDERFLOW;
+        } finally {
+            src.position(sp - src.arrayOffset());
+            dst.position(dp - dst.arrayOffset());
+        }
     }
 
     private CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) {
-       int mark = src.position();
-       try {
-           while (src.hasRemaining()) {
-              char c = src.get();
-              if (Surrogate.is(c)) {
-                  if (sgp.parse(c, src) < 0)
-                     return sgp.error();
-                  return sgp.unmappableResult();
-              }
-              if (c >= '\uFFFE')
-                  return CoderResult.unmappableForLength(1);
-              if (!dst.hasRemaining())
-                  return CoderResult.OVERFLOW;
+        int mark = src.position();
+        try {
+            while (src.hasRemaining()) {
+                char c = src.get();
+                if (Surrogate.is(c)) {
+                    if (sgp.parse(c, src) < 0)
+                        return sgp.error();
+                    return sgp.unmappableResult();
+                }
+                if (c >= '\uFFFE')
+                    return CoderResult.unmappableForLength(1);
+                if (!dst.hasRemaining())
+                    return CoderResult.OVERFLOW;
 
-              char e = index2.charAt(index1[(c & mask1) >> shift]
-                                   + (c & mask2));
+                char e = index2.charAt(index1[(c & mask1) >> shift]
+                                       + (c & mask2));
 
-              // If output byte is zero because input char is zero
-              // then character is mappable, o.w. fail
-              if (e == '\u0000' && c != '\u0000')
-                  return CoderResult.unmappableForLength(1);
+                // If output byte is zero because input char is zero
+                // then character is mappable, o.w. fail
+                if (e == '\u0000' && c != '\u0000')
+                    return CoderResult.unmappableForLength(1);
 
-              mark++;
-              dst.put((byte)e);
-           }
-           return CoderResult.UNDERFLOW;
-       } finally {
-           src.position(mark);
-       }
+                mark++;
+                dst.put((byte)e);
+            }
+            return CoderResult.UNDERFLOW;
+        } finally {
+            src.position(mark);
+        }
     }
 
     protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
-       if (true && src.hasArray() && dst.hasArray())
-           return encodeArrayLoop(src, dst);
-       else
-           return encodeBufferLoop(src, dst);
+        if (true && src.hasArray() && dst.hasArray())
+            return encodeArrayLoop(src, dst);
+        else
+            return encodeBufferLoop(src, dst);
     }
 
     public byte encode(char inputChar) {
-       return (byte)index2.charAt(index1[(inputChar & mask1) >> shift] +
-              (inputChar & mask2));
+        return (byte)index2.charAt(index1[(inputChar & mask1) >> shift] +
+                (inputChar & mask2));
     }
 }
--- a/jaxws/src/share/classes/com/sun/codemodel/internal/util/Surrogate.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/codemodel/internal/util/Surrogate.java	Mon May 04 21:10:41 2009 -0700
@@ -112,7 +112,7 @@
 
         public Parser() { }
 
-        private int character;                // UCS-4
+        private int character;          // UCS-4
         private CoderResult error = CoderResult.UNDERFLOW;
         private boolean isPair;
 
--- a/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Mon May 04 21:10:41 2009 -0700
@@ -55,12 +55,19 @@
  */
 public class HttpSOAPConnection extends SOAPConnection {
 
-    protected static Logger log =
+    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 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);
@@ -96,13 +106,18 @@
         }
 
         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 final String SSL_PKG;
+    private static  final String 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";
+
+    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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java	Mon May 04 21:10:41 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/jaxws/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/txw2/DatatypeWriter.java	Mon May 04 21:10:41 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() {
 
-    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;
+        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 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];
         }
-    };
+
+        public int size() {
+          return BUILTIN_ARRAY.length;
+        }
+      });
 }
--- a/jaxws/src/share/classes/com/sun/xml/internal/txw2/Document.java	Mon Apr 20 15:25:02 2009 -0700
+++ b/jaxws/src/share/classes/com/sun/xml/internal/txw2/Document.java	Mon May 04 21:10:41 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);
     }