You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2016/04/27 15:30:53 UTC

[1/2] cxf git commit: More stream work

Repository: cxf
Updated Branches:
  refs/heads/master 811f40df5 -> 896f1abec


More stream work


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

Branch: refs/heads/master
Commit: ae4e8cf0c44b231d1068da304acbe5453f02e5ca
Parents: 811f40d
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Apr 27 11:40:37 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Apr 27 11:40:37 2016 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/staxutils/StaxUtilsTest.java |  2 ++
 .../org/apache/cxf/tools/util/PropertyUtil.java | 30 ++++++++++----------
 .../tools/validator/internal/Stax2DOMTest.java  |  6 ++--
 3 files changed, 20 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ae4e8cf0/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java b/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
index 818d262..eda6049 100644
--- a/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
+++ b/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
@@ -111,6 +111,7 @@ public class StaxUtilsTest extends Assert {
            
         // write output to a string
         String output = baos.toString();       
+        baos.close();
         
         // re-read the input xml doc to a string
         InputStreamReader inputStreamReader = new InputStreamReader(getTestStream(soapMessage));
@@ -123,6 +124,7 @@ public class StaxUtilsTest extends Assert {
             n = inputStreamReader.read(buffer);
         }
         String input = stringWriter.toString();
+        stringWriter.close();
         // seach for the first begin of "<soap:Envelope" to escape the apache licenses header
         int beginIndex = input.indexOf("<soap:Envelope");
         input = input.substring(beginIndex);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ae4e8cf0/tools/common/src/main/java/org/apache/cxf/tools/util/PropertyUtil.java
----------------------------------------------------------------------
diff --git a/tools/common/src/main/java/org/apache/cxf/tools/util/PropertyUtil.java b/tools/common/src/main/java/org/apache/cxf/tools/util/PropertyUtil.java
index e1e7a0a..02061cb 100644
--- a/tools/common/src/main/java/org/apache/cxf/tools/util/PropertyUtil.java
+++ b/tools/common/src/main/java/org/apache/cxf/tools/util/PropertyUtil.java
@@ -34,24 +34,24 @@ public class PropertyUtil {
     private Map<String, String>  maps = new HashMap<String, String>();
 
     public void load(InputStream is, String delim) throws IOException {
-        BufferedReader br = new BufferedReader(new InputStreamReader(is));
-        String line = br.readLine();
-        while (!StringUtils.isEmpty(line)) {
-            StringTokenizer st = new StringTokenizer(line, delim);
-            String key = null;
-            String value = null;
-            if (st.hasMoreTokens()) {
-                key  = st.nextToken().trim();
-            }
-            if (st.hasMoreTokens()) {
-                value = st.nextToken().trim();
-            }
+        try (BufferedReader br = new BufferedReader(new InputStreamReader(is))) {
+            String line = br.readLine();
+            while (!StringUtils.isEmpty(line)) {
+                StringTokenizer st = new StringTokenizer(line, delim);
+                String key = null;
+                String value = null;
+                if (st.hasMoreTokens()) {
+                    key  = st.nextToken().trim();
+                }
+                if (st.hasMoreTokens()) {
+                    value = st.nextToken().trim();
+                }
 
-            maps.put(key, value);
+                maps.put(key, value);
 
-            line = br.readLine();
+                line = br.readLine();
+            }
         }
-        br.close();
     }
     
     public void load(InputStream is) throws IOException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/ae4e8cf0/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
----------------------------------------------------------------------
diff --git a/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java b/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
index c0b4141..7340fcc 100644
--- a/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
+++ b/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
@@ -83,9 +83,9 @@ public class Stax2DOMTest extends Assert {
         File wsdlFile = new File(getClass().getResource(
                 "/validator_wsdl/jms_test.wsdl").toURI());
         File tempFile = File.createTempFile("Stax2DOMTest", ".wsdl");
-        FileOutputStream output = new FileOutputStream(tempFile);
-        IOUtils.copyAndCloseInput(new FileInputStream(wsdlFile), output);
-        output.close();
+        try (FileOutputStream output = new FileOutputStream(tempFile)) {
+            IOUtils.copyAndCloseInput(new FileInputStream(wsdlFile), output);
+        }
         return tempFile;
     }
 


[2/2] cxf git commit: Updating a few dependencies

Posted by co...@apache.org.
Updating a few dependencies


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

Branch: refs/heads/master
Commit: 896f1abec915897967905762d6e850cfb6bac3bc
Parents: ae4e8cf
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Apr 27 14:30:43 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Apr 27 14:30:43 2016 +0100

----------------------------------------------------------------------
 parent/pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/896f1abe/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 9e97a5b..9b7ad82 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -86,12 +86,12 @@
         <cxf.fastinfoset.bundle.version>1.2.13_1</cxf.fastinfoset.bundle.version>
         <cxf.guava.version>18.0</cxf.guava.version>
         <cxf.hazelcast.version>1.9.4</cxf.hazelcast.version>
-        <cxf.httpcomponents.asyncclient.version>4.1</cxf.httpcomponents.asyncclient.version>
+        <cxf.httpcomponents.asyncclient.version>4.1.1</cxf.httpcomponents.asyncclient.version>
         <cxf.httpcomponents.asyncclient.version.range>[4.0,4.2)</cxf.httpcomponents.asyncclient.version.range>
-        <cxf.httpcomponents.client.version>4.5.1</cxf.httpcomponents.client.version>
+        <cxf.httpcomponents.client.version>4.5.2</cxf.httpcomponents.client.version>
         <cxf.httpcomponents.core.version>4.4.1</cxf.httpcomponents.core.version>
         <cxf.httpcomponents.core.version.range>[4.3,4.5.0)</cxf.httpcomponents.core.version.range>
-        <cxf.jackson.version>2.6.5</cxf.jackson.version>
+        <cxf.jackson.version>2.6.6</cxf.jackson.version>
         <cxf.james.mim4j.version>0.7.2</cxf.james.mim4j.version>
         <cxf.logback.classic.version>1.0.13</cxf.logback.classic.version>
         <cxf.log4j.version>1.2.17</cxf.log4j.version>
@@ -140,7 +140,7 @@
         <cxf.servlet-api.version>1.0</cxf.servlet-api.version>
         <cxf.servlet-api-2.5.artifact>geronimo-servlet_2.5_spec</cxf.servlet-api-2.5.artifact>
         <cxf.servlet-api-2.5.version>1.1.2</cxf.servlet-api-2.5.version>
-        <cxf.slf4j.version>1.7.19</cxf.slf4j.version>
+        <cxf.slf4j.version>1.7.21</cxf.slf4j.version>
         <cxf.specs.jaxws.api.version>1.2</cxf.specs.jaxws.api.version>
         <cxf.spring.version>4.1.9.RELEASE</cxf.spring.version>
         <cxf.spring.security.version>3.2.9.RELEASE</cxf.spring.security.version>