cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject git commit: Fixed checkstyle issues
Date Fri, 11 Jul 2014 02:22:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2209258ce -> 6ba3e0b61


Fixed checkstyle issues


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6ba3e0b6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6ba3e0b6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6ba3e0b6

Branch: refs/heads/master
Commit: 6ba3e0b6107cacbefc029d71858377a9277afc07
Parents: 2209258
Author: reta <drreta@gmail.com>
Authored: Thu Jul 10 22:22:02 2014 -0400
Committer: reta <drreta@gmail.com>
Committed: Thu Jul 10 22:22:02 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/cxf/interceptor/Fault.java  |  4 +--
 .../staxutils/SysPropExpandingStreamReader.java | 33 +++++++++++---------
 .../cxf/staxutils/XMLStreamReaderWrapper.java   |  2 +-
 .../SysPropExpandingStreamReaderTest.java       | 14 ++++++---
 .../org/apache/cxf/wsdl11/WSDLManagerImpl.java  |  3 +-
 5 files changed, 31 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6ba3e0b6/core/src/main/java/org/apache/cxf/interceptor/Fault.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/Fault.java b/core/src/main/java/org/apache/cxf/interceptor/Fault.java
index b5bc123..3c40a48 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/Fault.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/Fault.java
@@ -25,12 +25,12 @@ import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 
+import org.w3c.dom.Element;
+
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.i18n.UncheckedException;
 import org.apache.cxf.helpers.DOMUtils;
 
-import org.w3c.dom.Element;
-
 /**
  * A Fault that occurs during invocation processing.
  */

http://git-wip-us.apache.org/repos/asf/cxf/blob/6ba3e0b6/core/src/main/java/org/apache/cxf/staxutils/SysPropExpandingStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/SysPropExpandingStreamReader.java
b/core/src/main/java/org/apache/cxf/staxutils/SysPropExpandingStreamReader.java
index 4987338..04a2882 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/SysPropExpandingStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/SysPropExpandingStreamReader.java
@@ -34,25 +34,28 @@ public class SysPropExpandingStreamReader extends DelegatingXMLStreamReader
{
     }
 
     protected String expandSystemProperty(String value) {
-        if (!isEmpty(value)) {
-            final int startIndx = value.indexOf(DELIMITER);
-            if (startIndx > -1) {
-                final int endIndx = value.lastIndexOf(DELIMITER);
-                if (endIndx > -1 && startIndx + 1 < endIndx) {
-                    final String propName = value.substring(startIndx + 1, endIndx);
-                    if (!isEmpty(propName)) {
-                        final String envValue = System.getProperty(propName);
-                        if (!isEmpty(envValue)) {
-                            StringBuilder sb = new StringBuilder();
-                            sb.append(value.substring(0, startIndx));
-                            sb.append(envValue);
-                            sb.append(value.substring(endIndx + 1));
-                            value = sb.toString();
-                        }
+        if (isEmpty(value)) {
+            return value;
+        }
+        
+        final int startIndx = value.indexOf(DELIMITER);
+        if (startIndx > -1) {
+            final int endIndx = value.lastIndexOf(DELIMITER);
+            if (endIndx > -1 && startIndx + 1 < endIndx) {
+                final String propName = value.substring(startIndx + 1, endIndx);
+                if (!isEmpty(propName)) {
+                    final String envValue = System.getProperty(propName);
+                    if (!isEmpty(envValue)) {
+                        StringBuilder sb = new StringBuilder();
+                        sb.append(value.substring(0, startIndx));
+                        sb.append(envValue);
+                        sb.append(value.substring(endIndx + 1));
+                        value = sb.toString();
                     }
                 }
             }
         }
+        
         return value;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/6ba3e0b6/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java b/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
index 36c582f..ea0f307 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/XMLStreamReaderWrapper.java
@@ -26,5 +26,5 @@ import javax.xml.stream.XMLStreamReader;
  */
 public interface XMLStreamReaderWrapper {
     
-    public XMLStreamReader wrap(XMLStreamReader reader);
+    XMLStreamReader wrap(XMLStreamReader reader);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6ba3e0b6/core/src/test/java/org/apache/cxf/staxutils/SysPropExpandingStreamReaderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/cxf/staxutils/SysPropExpandingStreamReaderTest.java
b/core/src/test/java/org/apache/cxf/staxutils/SysPropExpandingStreamReaderTest.java
index 59a188c..4b363c7 100644
--- a/core/src/test/java/org/apache/cxf/staxutils/SysPropExpandingStreamReaderTest.java
+++ b/core/src/test/java/org/apache/cxf/staxutils/SysPropExpandingStreamReaderTest.java
@@ -23,11 +23,12 @@ import java.io.InputStream;
 
 import javax.xml.stream.XMLStreamReader;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
 import org.apache.cxf.helpers.DOMUtils;
 import org.junit.Assert;
 import org.junit.Test;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 public class SysPropExpandingStreamReaderTest extends Assert {
 
@@ -36,11 +37,14 @@ public class SysPropExpandingStreamReaderTest extends Assert {
         final String barProp = System.setProperty("bar", "BAR-VALUE");
         final String blahProp = System.setProperty("blah", "BLAH-VALUE");
         try {
-            XMLStreamReader reader = new SysPropExpandingStreamReader(StaxUtils.createXMLStreamReader(getTestStream("./resources/sysprops.xml")));
+            XMLStreamReader reader = new SysPropExpandingStreamReader(
+                StaxUtils.createXMLStreamReader(getTestStream("./resources/sysprops.xml")));
             Document doc = StaxUtils.read(reader);
-            Element abc = DOMUtils.getChildrenWithName(doc.getDocumentElement(), "http://foo/bar",
"abc").iterator().next();
+            Element abc = DOMUtils.getChildrenWithName(doc.getDocumentElement(), 
+                "http://foo/bar", "abc").iterator().next();
             assertEquals("fooBAR-VALUEfoo", abc.getTextContent());
-            Element def = DOMUtils.getChildrenWithName(doc.getDocumentElement(), "http://foo/bar",
"def").iterator().next();
+            Element def = DOMUtils.getChildrenWithName(doc.getDocumentElement(),        
            
+                "http://foo/bar", "def").iterator().next();
             assertEquals("ggggg", def.getTextContent());
             assertEquals("BLAH-VALUE2", def.getAttribute("myAttr"));
         } finally {

http://git-wip-us.apache.org/repos/asf/cxf/blob/6ba3e0b6/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
index 2f24f9f..f04fb05 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
@@ -41,6 +41,7 @@ import javax.xml.stream.XMLStreamReader;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+
 import org.xml.sax.InputSource;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
@@ -49,8 +50,6 @@ import org.apache.cxf.common.util.CacheMap;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
 import org.apache.cxf.service.model.ServiceSchemaInfo;
 import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.cxf.staxutils.DelegatingXMLStreamReader;
-import org.apache.cxf.staxutils.SysPropExpandingStreamReader;
 import org.apache.cxf.staxutils.XMLStreamReaderWrapper;
 import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.cxf.wsdl.WSDLExtensionLoader;


Mime
View raw message