< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -48,13 +48,11 @@
  *
  */
 class HttpSOAPConnection extends SOAPConnection {
 
     public static final String vmVendor = SAAJUtil.getSystemProperty("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,

@@ -93,11 +91,11 @@
         if (closed) {
             log.severe("SAAJ0003.p2p.call.already.closed.conn");
             throw new SOAPExceptionImpl("Connection is closed");
         }
 
-        Class urlEndpointClass = null;
+        Class<?> urlEndpointClass = null;
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         try {
             if (loader != null) {
                 urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
             } else {

@@ -196,22 +194,22 @@
             if (message.saveRequired())
                 message.saveChanges();
 
             MimeHeaders headers = message.getMimeHeaders();
 
-            Iterator it = headers.getAllHeaders();
+            Iterator<?> it = headers.getAllHeaders();
             boolean hasAuth = false; // true if we find explicit Auth header
             while (it.hasNext()) {
                 MimeHeader header = (MimeHeader) it.next();
 
                 String[] values = headers.getHeader(header.getName());
                 if (values.length == 1)
                     httpConnection.setRequestProperty(
                         header.getName(),
                         header.getValue());
                 else {
-                    StringBuffer concat = new StringBuffer();
+                    StringBuilder concat = new StringBuilder();
                     int i = 0;
                     while (i < values.length) {
                         if (i != 0)
                             concat.append(',');
                         concat.append(values[i]);

@@ -353,11 +351,11 @@
     public SOAPMessage get(Object endPoint) throws SOAPException {
         if (closed) {
             log.severe("SAAJ0011.p2p.get.already.closed.conn");
             throw new SOAPExceptionImpl("Connection is closed");
         }
-        Class urlEndpointClass = null;
+        Class<?> urlEndpointClass = null;
 
         try {
             urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint");
         } catch (Exception ex) {
             //Do nothing. URLEndpoint is available only when JAXM is there.

@@ -439,11 +437,11 @@
             httpConnection.setRequestMethod("GET");
 
             httpConnection.setDoOutput(true);
             httpConnection.setDoInput(true);
             httpConnection.setUseCaches(false);
-            httpConnection.setFollowRedirects(true);
+            httpConnection.setInstanceFollowRedirects(true);
 
             httpConnection.connect();
 
             try {
 

@@ -589,11 +587,11 @@
             System.setProperty("java.protocol.handler.pkgs", pkgs);
             if (log.isLoggable(Level.FINE))
                 log.log(Level.FINE, "SAAJ0054.p2p.set.providers",
                         new String[] { pkgs });
             try {
-                Class c = Class.forName(SSL_PROVIDER);
+                Class<?> c = Class.forName(SSL_PROVIDER);
                 Provider p = (Provider) c.newInstance();
                 Security.addProvider(p);
                 if (log.isLoggable(Level.FINE))
                     log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider",
                             new String[] { SSL_PROVIDER });
< prev index next >