cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1241187 - in /cxf/branches/2.5.x-fixes: ./ rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/ rt/core/src/main/java/org/apache/cxf/catalog/ rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/ rt/databinding/xmlbeans/src...
Date Mon, 06 Feb 2012 21:29:25 GMT
Author: dkulp
Date: Mon Feb  6 21:29:25 2012
New Revision: 1241187

URL: http://svn.apache.org/viewvc?rev=1241187&view=rev
Log:
Merged revisions 1238842 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1238842 | dkulp | 2012-01-31 17:40:42 -0500 (Tue, 31 Jan 2012) | 2 lines
  
  Fix some minor SONAR issues mostly so I can say I actually accomplished
  something useful today. :-)  (or  :-( )
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java
    cxf/branches/2.5.x-fixes/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
    cxf/branches/2.5.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/DataWriterImpl.java
    cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
    cxf/branches/2.5.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
    cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
    cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.5.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
Mon Feb  6 21:29:25 2012
@@ -241,7 +241,7 @@ public class CorbaObjectReader {
             long l2 = l & 0x7FFFFFFFFFFFFFL;
             BigInteger i = BigInteger.valueOf(l2);
             BigInteger i2 = BigInteger.valueOf(0);
-            i2.setBit(63);
+            i2 = i2.setBit(63);
             i = i.or(i2);
             return i;
         }

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java
Mon Feb  6 21:29:25 2012
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Collections;
@@ -53,7 +54,7 @@ public class OASISCatalogManager {
     
 
     private Object resolver;
-    private Set<URL> loadedCatalogs = Collections.synchronizedSet(new HashSet<URL>());
+    private Set<URI> loadedCatalogs = Collections.synchronizedSet(new HashSet<URI>());
     private Bus bus;
 
     public OASISCatalogManager() {
@@ -114,15 +115,15 @@ public class OASISCatalogManager {
         Enumeration<URL> catalogs = classLoader.getResources(name);
         while (catalogs.hasMoreElements()) {
             URL catalogURL = catalogs.nextElement();
-            if (!loadedCatalogs.contains(catalogURL)) {
+            if (!loadedCatalogs.contains(URI.create(catalogURL.toString()))) {
                 ((Catalog)resolver).parseCatalog(catalogURL);
-                loadedCatalogs.add(catalogURL);
+                loadedCatalogs.add(URI.create(catalogURL.toString()));
             }
         }
     }
 
     public final void loadCatalog(URL catalogURL) throws IOException {
-        if (!loadedCatalogs.contains(catalogURL) && resolver != null) {
+        if (!loadedCatalogs.contains(URI.create(catalogURL.toString())) && resolver
!= null) {
             if ("file".equals(catalogURL.getProtocol())) {
                 try {
                     File file = new File(catalogURL.toURI());
@@ -136,7 +137,7 @@ public class OASISCatalogManager {
 
             ((Catalog)resolver).parseCatalog(catalogURL);
 
-            loadedCatalogs.add(catalogURL);
+            loadedCatalogs.add(URI.create(catalogURL.toString()));
         }
     }
 

Modified: cxf/branches/2.5.x-fixes/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
Mon Feb  6 21:29:25 2012
@@ -64,7 +64,7 @@ public class DataReaderImpl implements D
                 
                 return o;
             } catch (Exception e) {
-                new Fault(e);
+                throw new Fault(e);
             }
         }
         return null;

Modified: cxf/branches/2.5.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/DataWriterImpl.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/DataWriterImpl.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/databinding/xmlbeans/src/main/java/org/apache/cxf/xmlbeans/DataWriterImpl.java
Mon Feb  6 21:29:25 2012
@@ -48,7 +48,6 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.ws.commons.schema.XmlSchemaAnnotated;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.xmlbeans.SchemaType;
 import org.apache.xmlbeans.XmlAnySimpleType;
@@ -75,8 +74,6 @@ public class DataWriterImpl implements D
             if (typeClass == null) {
                 typeClass = obj.getClass();
             }
-            XmlSchemaAnnotated schemaType = part ==  null ? null : part.getXmlSchema();
-            
             if (!XmlObject.class.isAssignableFrom(typeClass) && part != null) {
                 typeClass = (Class<?>)part.getProperty(XmlAnySimpleType.class.getName());
                 
@@ -103,8 +100,7 @@ public class DataWriterImpl implements D
             }
 
             
-            if (obj != null
-                || !(schemaType instanceof XmlSchemaElement)) {
+            if (obj != null) {
                 XmlOptions options = new XmlOptions();
                 if (schema != null) {
                     options.setValidateOnSet();

Modified: cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
Mon Feb  6 21:29:25 2012
@@ -20,6 +20,7 @@
 package org.apache.cxf.transport.http.auth;
 
 import java.io.UnsupportedEncodingException;
+import java.net.URI;
 import java.net.URL;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -39,7 +40,7 @@ public class DigestAuthSupplier implemen
     };
 
     final MessageDigest md5Helper;
-    Map<URL, DigestInfo> authInfo = new ConcurrentHashMap<URL, DigestInfo>();

+    Map<URI, DigestInfo> authInfo = new ConcurrentHashMap<URI, DigestInfo>();

 
     public DigestAuthSupplier() {
         MessageDigest md = null;
@@ -64,8 +65,9 @@ public class DigestAuthSupplier implemen
                                    URL currentURL,
                                    Message message,
                                    String fullHeader) {
+        URI currentURI = URI.create(currentURL.toString());
         if (fullHeader == null) {
-            DigestInfo di = authInfo.get(currentURL);
+            DigestInfo di = authInfo.get(currentURI);
             if (di != null) {
                 /* Preemptive authentication is only possible if we have a cached
                  * challenge
@@ -97,7 +99,7 @@ public class DigestAuthSupplier implemen
                 if (di.method == null) {
                     di.method = "POST";
                 }
-                authInfo.put(currentURL, di);
+                authInfo.put(currentURI, di);
                 
                 return di.generateAuth(currentURL.getFile(), 
                                        authPolicy.getUserName(),

Modified: cxf/branches/2.5.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
(original)
+++ cxf/branches/2.5.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
Mon Feb  6 21:29:25 2012
@@ -222,7 +222,7 @@ public class ProcessorTestBase extends A
                         throw new ComparisonFailure("Attributes not equal: ",
                                                 attr.getKey() + ":" + attr.getValue(),
                                                 attr.getKey() + ":"
-                                                + sourceTag.getAttributes().get(attr.getKey()).toString());
+                                                + sourceTag.getAttributes().get(attr.getKey()));
                     }
                 } else {
                     throw new AssertionError("Attribute: " + attr + " is missing in the source
file.");
@@ -232,8 +232,8 @@ public class ProcessorTestBase extends A
             if (!StringUtils.isEmpty(expectedTag.getText())
                 && !expectedTag.getText().equals(sourceTag.getText())) {
                 throw new ComparisonFailure("Text not equal: ",
-                                            expectedTag.getText().toString(),
-                                            sourceTag.getText().toString());
+                                            expectedTag.getText(),
+                                            sourceTag.getText());
             }
         }
         return true;
@@ -285,8 +285,8 @@ public class ProcessorTestBase extends A
         if (!StringUtils.isEmpty(expected.getText())
                 && !expected.getText().equals(source.getText())) {
             throw new ComparisonFailure("Text not equal: ",
-                                        expected.getText().toString(),
-                                        source.getText().toString());
+                                        expected.getText(),
+                                        source.getText());
         }
 
         if (!expected.getTags().isEmpty()) {

Modified: cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
(original)
+++ cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
Mon Feb  6 21:29:25 2012
@@ -585,7 +585,7 @@ public class WSDLToCorbaHelper {
             } else {
                 String msg = "Unsupported Attribute Found in CORBA Binding Generation:"
                     + attrName;
-                LOG.log(Level.WARNING, msg.toString());
+                LOG.log(Level.WARNING, msg);
             }
         }
 
@@ -908,7 +908,7 @@ public class WSDLToCorbaHelper {
                 if (!anonymous) {
                     String msg = "Couldn't Map to Array:" + name + ":minOccurs="
                         + minOccurs + ":maxOccurs=" + maxOccurs;
-                    LOG.log(Level.WARNING, msg.toString());
+                    LOG.log(Level.WARNING, msg);
                     return null;
                 } else {
                     return WSDLTypes.mapToArray(name, checkPrefix(schematypeName), arrayType,
@@ -1418,7 +1418,7 @@ public class WSDLToCorbaHelper {
                     caselist.add("TRUE");
                 } else {
                     String msg = "Discriminator Type doesnt match number of Choices in Union:"
+ name;
-                    LOG.log(Level.WARNING, msg.toString());
+                    LOG.log(Level.WARNING, msg);
                 }
             }
         }

Modified: cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java?rev=1241187&r1=1241186&r2=1241187&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
(original)
+++ cxf/branches/2.5.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
Mon Feb  6 21:29:25 2012
@@ -84,7 +84,7 @@ public final class WSDLTypes {
                     Node node = nlist.item(0);
                     String info = node.getNodeValue();
 
-                    info.trim();
+                    info = info.trim();
 
                     if ("corba:binding=".equals(info.substring(0, 14))) {
                         String bindingName = info.substring(14);



Mime
View raw message