You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2019/05/24 17:49:06 UTC

[cxf] branch master updated (0b80003 -> 7c7bd3f)

This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 0b80003  remove jaxb-xjc dependency from core as we actually don't need it
     new d89cfe4  Cast to Buffer to call flip so code compiled with Java11 will run on Java8
     new 7c7bd3f  Remove jaxb-xjc from default dependencies for java11, add it where it's needed

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 core/src/main/java/org/apache/cxf/common/util/UrlUtils.java |  3 ++-
 core/src/main/java/org/apache/cxf/io/ReaderInputStream.java | 13 +++++++------
 parent/pom.xml                                              |  8 ++------
 .../http/asyncclient/CXFHttpAsyncRequestProducer.java       |  3 ++-
 systests/jaxws/pom.xml                                      |  5 +++++
 systests/transport-undertow/pom.xml                         |  5 +++++
 systests/transports/pom.xml                                 |  5 +++++
 7 files changed, 28 insertions(+), 14 deletions(-)


[cxf] 02/02: Remove jaxb-xjc from default dependencies for java11, add it where it's needed

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 7c7bd3fbf57630063836adbe405918d012ad5b97
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Fri May 24 13:03:41 2019 -0400

    Remove jaxb-xjc from default dependencies for java11, add it where it's needed
---
 parent/pom.xml                      | 8 ++------
 systests/jaxws/pom.xml              | 5 +++++
 systests/transport-undertow/pom.xml | 5 +++++
 systests/transports/pom.xml         | 5 +++++
 4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 471fec3..1a83ea1 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -558,7 +558,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-invoker-plugin</artifactId>
-                    <version>3.2.0</version>
+                    <version>3.1.0</version>
                 </plugin>
             </plugins>
         </pluginManagement>
@@ -2542,6 +2542,7 @@
                 <maven.test.skip>true</maven.test.skip>
                 <pmd.skip>true</pmd.skip>
                 <checkstyle.skip>true</checkstyle.skip>
+                <invoker.skip>true</invoker.skip>
             </properties>
         </profile>
         <profile>
@@ -2881,11 +2882,6 @@
                     <artifactId>jboss-rmi-api_1.0_spec</artifactId>
                     <version>1.0.6.Final</version>
                 </dependency>
-                <dependency>
-                    <groupId>org.glassfish.jaxb</groupId>
-                    <artifactId>jaxb-xjc</artifactId>
-                    <scope>test</scope>
-                </dependency>
             </dependencies>
 	</profile>
     </profiles>
diff --git a/systests/jaxws/pom.xml b/systests/jaxws/pom.xml
index 926135e..4a99373 100644
--- a/systests/jaxws/pom.xml
+++ b/systests/jaxws/pom.xml
@@ -271,6 +271,11 @@
             <artifactId>httpclient</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+            <scope>test</scope>
+        </dependency>
 
     </dependencies>
     <profiles>
diff --git a/systests/transport-undertow/pom.xml b/systests/transport-undertow/pom.xml
index f6b70f7..c134f64 100644
--- a/systests/transport-undertow/pom.xml
+++ b/systests/transport-undertow/pom.xml
@@ -237,5 +237,10 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
diff --git a/systests/transports/pom.xml b/systests/transports/pom.xml
index 6dae9bc..873a57f 100644
--- a/systests/transports/pom.xml
+++ b/systests/transports/pom.xml
@@ -276,6 +276,11 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.glassfish.jaxb</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.bouncycastle</groupId>
             <artifactId>bctls-jdk15on</artifactId>
             <version>${cxf.bcprov.version}</version>


[cxf] 01/02: Cast to Buffer to call flip so code compiled with Java11 will run on Java8

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit d89cfe4f6a52d133205af80fd363ecfdc85e41e5
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Fri May 24 10:42:51 2019 -0400

    Cast to Buffer to call flip so code compiled with Java11 will run on Java8
---
 core/src/main/java/org/apache/cxf/common/util/UrlUtils.java |  3 ++-
 core/src/main/java/org/apache/cxf/io/ReaderInputStream.java | 13 +++++++------
 .../http/asyncclient/CXFHttpAsyncRequestProducer.java       |  3 ++-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java b/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java
index 1cd79d0..452f78b 100644
--- a/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java
@@ -21,6 +21,7 @@ package org.apache.cxf.common.util;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
+import java.nio.Buffer;
 import java.nio.BufferUnderflowException;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
@@ -101,7 +102,7 @@ public final class UrlUtils {
                     out.put((byte) b);
                 }
             }
-            out.flip();
+            ((Buffer)out).flip();
             return Charset.forName(enc).decode(out).toString();
         }
         return value;
diff --git a/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java b/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java
index dd4c533..6f0ced9 100644
--- a/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java
+++ b/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java
@@ -21,6 +21,7 @@ package org.apache.cxf.io;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
 import java.nio.charset.Charset;
@@ -121,9 +122,9 @@ public class ReaderInputStream extends InputStream {
         this.reader = reader;
         this.encoder = encoder;
         this.encoderIn = CharBuffer.allocate(bufferSize);
-        this.encoderIn.flip();
+        ((Buffer)this.encoderIn).flip();
         this.encoderOut = ByteBuffer.allocate(128);
-        this.encoderOut.flip();
+        ((Buffer)this.encoderOut).flip();
     }
 
     /**
@@ -193,7 +194,7 @@ public class ReaderInputStream extends InputStream {
     private void fillBuffer() throws IOException {
         if (!endOfInput && (lastCoderResult == null || lastCoderResult.isUnderflow())) {
             encoderIn.compact();
-            int position = encoderIn.position();
+            int position = ((Buffer)encoderIn).position();
             // We don't use Reader#read(CharBuffer) here because it is more efficient
             // to write directly to the underlying char array (the default implementation
             // copies data to a temporary char array).
@@ -201,13 +202,13 @@ public class ReaderInputStream extends InputStream {
             if (c == -1) {
                 endOfInput = true;
             } else {
-                encoderIn.position(position + c);
+                ((Buffer)encoderIn).position(position + c);
             }
-            encoderIn.flip();
+            ((Buffer)encoderIn).flip();
         }
         encoderOut.compact();
         lastCoderResult = encoder.encode(encoderIn, encoderOut, endOfInput);
-        encoderOut.flip();
+        ((Buffer)encoderOut).flip();
     }
     
     /**
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
index ecb4a3f..f78bbcf 100644
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFHttpAsyncRequestProducer.java
@@ -23,6 +23,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.ReadableByteChannel;
@@ -79,7 +80,7 @@ public class CXFHttpAsyncRequestProducer implements HttpAsyncRequestProducer {
                 }
             }
             int i = -1;
-            buffer.rewind();
+            ((Buffer)buffer).rewind();
             if (buffer.hasRemaining() && chan != null) {
                 i = chan.read(buffer);
                 buffer.flip();