Author: fmui
Date: Fri Jul 17 09:06:12 2015
New Revision: 1691500
URL: http://svn.apache.org/r1691500
Log:
removed usage of internal APIs, compiles and runs on JDK 8u60 b23
Removed:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SunJREPortProvider.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/AbstractJreWssTube.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISJreTubeAssembler.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISJreTubelineAssemblerFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/client/JreWssMUTube.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/server/
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/resources/META-INF/services/com.sun.xml.internal.ws.api.pipe.TubelineAssemblerFactory
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/WSConverter.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISTubeAssembler.java
chemistry/opencmis/trunk/pom.xml
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java?rev=1691500&r1=1691499&r2=1691500&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
Fri Jul 17 09:06:12 2015
@@ -87,7 +87,8 @@ public class CmisWebServicesSpi implemen
String providerPackage =
provider.getClass().getPackage().getName();
if (providerPackage.startsWith("com.sun.xml.internal.ws.spi"))
{
- portProvider = new SunJREPortProvider();
+ throw new CmisRuntimeException(
+ "JRE JAX-WS implementation not supported anymore.
Please use Apache CXF.");
} else if (providerPackage.startsWith("com.sun.xml.ws.spi")) {
portProvider = new SunRIPortProvider();
} else if (providerPackage.startsWith("org.apache.cxf.jaxws"))
{
@@ -99,7 +100,8 @@ public class CmisWebServicesSpi implemen
+ SessionParameter.WEBSERVICES_JAXWS_IMPL + " to
specify one.");
}
} else if (JAXWS_IMPL_JRE.equals(jaxwsImpl)) {
- portProvider = new SunJREPortProvider();
+ throw new CmisRuntimeException(
+ "JRE JAX-WS implementation not supported anymore.
Please use Apache CXF.");
} else if (JAXWS_IMPL_RI.equals(jaxwsImpl)) {
portProvider = new SunRIPortProvider();
} else if (JAXWS_IMPL_CXF.equals(jaxwsImpl)) {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/WSConverter.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/WSConverter.java?rev=1691500&r1=1691499&r2=1691500&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/WSConverter.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/WSConverter.java
Fri Jul 17 09:06:12 2015
@@ -280,32 +280,19 @@ public final class WSConverter {
private static final BigInteger BIG_INT_32 = BigInteger.valueOf(32);
private static final BigInteger BIG_INT_64 = BigInteger.valueOf(64);
- private static Class<?> streamDataHandlerClass1;
- private static Method streamDataHandlerReadMethod1;
- private static Method streamDataHandlerCloseMethod1;
- private static Class<?> streamDataHandlerClass2;
- private static Method streamDataHandlerReadMethod2;
- private static Method streamDataHandlerCloseMethod2;
+ private static Class<?> streamDataHandlerClass;
+ private static Method streamDataHandlerReadMethod;
+ private static Method streamDataHandlerCloseMethod;
static {
try {
- streamDataHandlerClass1 =
Class.forName("org.jvnet.staxex.StreamingDataHandler");
- streamDataHandlerReadMethod1 =
streamDataHandlerClass1.getMethod("readOnce", new Class<?>[0]);
- streamDataHandlerCloseMethod1 =
streamDataHandlerClass1.getMethod("close", new Class<?>[0]);
+ streamDataHandlerClass =
Class.forName("org.jvnet.staxex.StreamingDataHandler");
+ streamDataHandlerReadMethod =
streamDataHandlerClass.getMethod("readOnce", new Class<?>[0]);
+ streamDataHandlerCloseMethod =
streamDataHandlerClass.getMethod("close", new Class<?>[0]);
} catch (Exception e) {
- streamDataHandlerClass1 = null;
- streamDataHandlerReadMethod1 = null;
- streamDataHandlerCloseMethod1 = null;
- }
-
- try {
- streamDataHandlerClass2 =
Class.forName("com.sun.xml.internal.org.jvnet.staxex.StreamingDataHandler");
- streamDataHandlerReadMethod2 =
streamDataHandlerClass2.getMethod("readOnce", new Class<?>[0]);
- streamDataHandlerCloseMethod2 =
streamDataHandlerClass2.getMethod("close", new Class<?>[0]);
- } catch (Exception e) {
- streamDataHandlerClass2 = null;
- streamDataHandlerReadMethod2 = null;
- streamDataHandlerCloseMethod2 = null;
+ streamDataHandlerClass = null;
+ streamDataHandlerReadMethod = null;
+ streamDataHandlerCloseMethod = null;
}
}
@@ -2636,17 +2623,14 @@ public final class WSConverter {
DataHandler streamDataHandler = contentStream.getStream();
if (streamDataHandler != null) {
try {
- if (streamDataHandlerClass1 != null &&
streamDataHandlerClass1.isInstance(streamDataHandler)) {
- result.setStream((InputStream)
streamDataHandlerReadMethod1.invoke(streamDataHandler,
- (Object[]) null));
- } else if (streamDataHandlerClass2 != null &&
streamDataHandlerClass2.isInstance(streamDataHandler)) {
- result.setStream((InputStream)
streamDataHandlerReadMethod2.invoke(streamDataHandler,
+ if (streamDataHandlerClass != null &&
streamDataHandlerClass.isInstance(streamDataHandler)) {
+ result.setStream((InputStream)
streamDataHandlerReadMethod.invoke(streamDataHandler,
(Object[]) null));
} else {
result.setStream(contentStream.getStream().getInputStream());
}
} catch (Exception e) {
- throw new CmisRuntimeException("Could not get the stream: " +
e.getMessage(), e);
+ throw new CmisRuntimeException("Could not get the stream: {}",
e.getMessage(), e);
}
}
@@ -2668,19 +2652,16 @@ public final class WSConverter {
if (streamDataHandler instanceof Closeable) {
((Closeable) streamDataHandler).close();
} else {
- if (streamDataHandlerClass1 != null &&
streamDataHandlerClass1.isInstance(streamDataHandler)) {
-
streamDataHandlerCloseMethod1.invoke(streamDataHandler, (Object[]) null);
- } else if (streamDataHandlerClass2 != null &&
streamDataHandlerClass2.isInstance(streamDataHandler)) {
-
streamDataHandlerCloseMethod2.invoke(streamDataHandler, (Object[]) null);
+ if (streamDataHandlerClass != null &&
streamDataHandlerClass.isInstance(streamDataHandler)) {
+ streamDataHandlerCloseMethod.invoke(streamDataHandler,
(Object[]) null);
}
}
} catch (Exception e) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Closing the stream failed: " + e.toString(), e);
+ LOG.debug("Closing the stream failed: {}", e.toString(),
e);
}
}
}
-
}
/**
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISTubeAssembler.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISTubeAssembler.java?rev=1691500&r1=1691499&r2=1691500&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISTubeAssembler.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/tube/OpenCMISTubeAssembler.java
Fri Jul 17 09:06:12 2015
@@ -19,17 +19,15 @@
package org.apache.chemistry.opencmis.commons.impl.tube;
import org.apache.chemistry.opencmis.commons.impl.tube.client.WssMUTube;
-import org.apache.chemistry.opencmis.commons.impl.tube.server.WssTube;
import com.sun.xml.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext;
import com.sun.xml.ws.api.pipe.Tube;
-import com.sun.xml.ws.api.pipe.TubelineAssembler;
+import com.sun.xml.ws.util.pipe.StandaloneTubeAssembler;
/**
* Assembler for OpenCMIS client and server tubelines.
*/
-public class OpenCMISTubeAssembler implements TubelineAssembler {
+public class OpenCMISTubeAssembler extends StandaloneTubeAssembler {
public Tube createClient(ClientTubeAssemblerContext context) {
Tube head = context.createTransportTube();
@@ -40,15 +38,4 @@ public class OpenCMISTubeAssembler imple
return context.createHandlerTube(head);
}
- public Tube createServer(ServerTubeAssemblerContext context) {
- Tube head = context.getTerminalTube();
- head = new WssTube(head);
- head = context.createHandlerTube(head);
- head = context.createMonitoringTube(head);
- head = context.createServerMUTube(head);
- head = context.createWsaTube(head);
- head = context.createSecurityTube(head);
-
- return head;
- }
}
Modified: chemistry/opencmis/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/pom.xml?rev=1691500&r1=1691499&r2=1691500&view=diff
==============================================================================
--- chemistry/opencmis/trunk/pom.xml (original)
+++ chemistry/opencmis/trunk/pom.xml Fri Jul 17 09:06:12 2015
@@ -378,8 +378,6 @@
<target>${maven.compile.target}</target>
<source>${maven.compile.source}</source>
<encoding>UTF-8</encoding>
- <forceJavacCompilerUse>true</forceJavacCompilerUse>
- <compilerArgument>-XDignore.symbol.file</compilerArgument>
</configuration>
</plugin>
<plugin>