You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2017/11/22 14:10:23 UTC
svn commit: r1816057 - in /chemistry/opencmis/trunk: ./
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/atompub/
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/t...
Author: fmui
Date: Wed Nov 22 14:10:23 2017
New Revision: 1816057
URL: http://svn.apache.org/viewvc?rev=1816057&view=rev
Log:
CMIS-1052: First steps towards Java 8, removed a few outdated pre-TCK tests
Removed:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/atompub/AtomPubTestBindingFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadOnlyTests.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/atompub/SimpleReadWriteTests.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadOnlyTests.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractSimpleReadWriteTests.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/Tools.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/SimpleReadOnlyTests.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/SimpleReadWriteTests.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/webservices/WebServicesTestBindingFactory.java
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-archetype/src/main/resources/archetype-resources/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ExceptionHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-extension-archetype/src/main/resources/archetype-resources/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/tck/AbstractTckIT.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java
chemistry/opencmis/trunk/pom.xml
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/pom.xml Wed Nov 22 14:10:23 2017
@@ -45,8 +45,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
+ <groupId>com.fasterxml.woodstox</groupId>
+ <artifactId>woodstox-core</artifactId>
<version>${woodstox.version}</version>
<exclusions>
<exclusion> <!-- included in Java 6 and above -->
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.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/XMLUtils.java?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java Wed Nov 22 14:10:23 2017
@@ -24,6 +24,7 @@ import java.io.OutputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.GregorianCalendar;
+import java.util.regex.Pattern;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -60,8 +61,8 @@ public final class XMLUtils {
try {
// Woodstox is the only supported and tested StAX implementation
- WstxInputFactory wstxFactory = (WstxInputFactory) ClassLoaderUtil.loadClass(
- "com.ctc.wstx.stax.WstxInputFactory").getDeclaredConstructor().newInstance();
+ WstxInputFactory wstxFactory = (WstxInputFactory) ClassLoaderUtil
+ .loadClass("com.ctc.wstx.stax.WstxInputFactory").getDeclaredConstructor().newInstance();
wstxFactory.configureForSpeed();
factory = wstxFactory;
@@ -92,8 +93,8 @@ public final class XMLUtils {
try {
// Woodstox is the only supported and tested StAX implementation
- WstxOutputFactory wstxFactory = (WstxOutputFactory) ClassLoaderUtil.loadClass(
- "com.ctc.wstx.stax.WstxOutputFactory").getDeclaredConstructor().newInstance();
+ WstxOutputFactory wstxFactory = (WstxOutputFactory) ClassLoaderUtil
+ .loadClass("com.ctc.wstx.stax.WstxOutputFactory").getDeclaredConstructor().newInstance();
wstxFactory.configureForSpeed();
wstxFactory.setProperty(WstxOutputProperties.P_OUTPUT_INVALID_CHAR_HANDLER,
new InvalidCharHandler.ReplacingHandler(' '));
@@ -400,8 +401,8 @@ public final class XMLUtils {
/**
* Parses a stream and returns the DOM document.
*/
- public static Document parseDomDocument(InputStream stream) throws ParserConfigurationException, SAXException,
- IOException {
+ public static Document parseDomDocument(InputStream stream)
+ throws ParserConfigurationException, SAXException, IOException {
return newDocumentBuilder().parse(stream);
}
@@ -429,4 +430,15 @@ public final class XMLUtils {
return transformer;
}
+
+ // --------------------------
+ // ---- Misc ---
+ // --------------------------
+
+ private static Pattern CLEAN_PATTERN = Pattern
+ .compile("[^\\\\x09\\\\x0A\\\\x0D\\\\x20-\\\\xD7FF\\\\xE000-\\\\xFFFD\\\\x10000-\\\\x10ââFFFF]");
+
+ public static String cleanXmlString(String s) {
+ return CLEAN_PATTERN.matcher(s).replaceAll(" ");
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-archetype/src/main/resources/archetype-resources/pom.xml?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-archetype/src/main/resources/archetype-resources/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-archetype/src/main/resources/archetype-resources/pom.xml Wed Nov 22 14:10:23 2017
@@ -53,9 +53,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
- <!-- requires at least Java 7 -->
- <target>1.7</target>
- <source>1.7</source>
+ <!-- requires at least Java 8 -->
+ <target>1.8</target>
+ <source>1.8</source>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/AbstractService.java Wed Nov 22 14:10:23 2017
@@ -241,7 +241,7 @@ public abstract class AbstractService {
if (ex != null) {
if (ex instanceof CmisBaseException) {
fault.setCode(((CmisBaseException) ex).getCode());
- fault.setMessage(ex.getMessage());
+ fault.setMessage(XMLUtils.cleanXmlString(ex.getMessage()));
if (ex instanceof CmisConstraintException) {
fault.setType(EnumServiceException.CONSTRAINT);
@@ -285,11 +285,11 @@ public abstract class AbstractService {
root.appendChild(entry);
Element key = doc.createElement("key");
- key.appendChild(doc.createTextNode(e.getKey()));
+ key.appendChild(doc.createTextNode(XMLUtils.cleanXmlString(e.getKey())));
entry.appendChild(key);
Element value = doc.createElement("value");
- value.appendChild(doc.createTextNode(e.getValue()));
+ value.appendChild(doc.createTextNode(XMLUtils.cleanXmlString(e.getValue())));
entry.appendChild(value);
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ExceptionHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ExceptionHelper.java?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ExceptionHelper.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/ExceptionHelper.java Wed Nov 22 14:10:23 2017
@@ -70,7 +70,7 @@ public final class ExceptionHelper {
Element node = doc.createElementNS("http://chemistry.apache.org/opencmis/exception", "stacktrace");
doc.appendChild(node);
- node.appendChild(doc.createTextNode(st));
+ node.appendChild(doc.createTextNode(XMLUtils.cleanXmlString(st)));
return node;
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-extension-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-extension-archetype/src/main/resources/archetype-resources/pom.xml?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-extension-archetype/src/main/resources/archetype-resources/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-extension-archetype/src/main/resources/archetype-resources/pom.xml Wed Nov 22 14:10:23 2017
@@ -19,10 +19,11 @@
<plugin>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.0</version>
+ <version>3.7.0</version>
<configuration>
- <target>1.6</target>
- <source>1.6</source>
+ <!-- requires at least Java 8 -->
+ <target>1.8</target>
+ <source>1.8</source>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/pom.xml Wed Nov 22 14:10:23 2017
@@ -92,7 +92,7 @@
<reuseForks>true</reuseForks>
<forkCount>1</forkCount>
<forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
- <argLine>-ea:org.apache.chemistry --add-modules java.xml.ws</argLine>
+ <argLine>-ea:org.apache.chemistry</argLine>
<systemPropertyVariables>
<systemProperty>
<name>org.apache.chemistry.opencmis.session.repository.id</name>
Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/tck/AbstractTckIT.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/tck/AbstractTckIT.java?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/tck/AbstractTckIT.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/tck/AbstractTckIT.java Wed Nov 22 14:10:23 2017
@@ -267,7 +267,7 @@ public abstract class AbstractTckIT exte
assertTrue("The test '" + test.getName() + "' returned a failure: " + result.getMessage(),
result.getStatus() != CmisTestResultStatus.FAILURE);
assertTrue(
- "The test '" + test.getName() + "' returned at an unexcepted exception: "
+ "The test '" + test.getName() + "' returned at an unexpected exception: "
+ result.getMessage(),
result.getStatus() != CmisTestResultStatus.UNEXPECTED_EXCEPTION);
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java Wed Nov 22 14:10:23 2017
@@ -82,8 +82,8 @@ public class InvalidQueryTest extends Ab
} catch (CmisInvalidArgumentException e) {
// excepted
} catch (Exception ex) {
- addResult(createResult(FAILURE, "This query is invalid and an unexcepted exception (" + ex.toString()
- + ") has been thrown: " + stmt, ex, false));
+ addResult(createResult(FAILURE, "This query is invalid and an unexpected exception (" + ex.toString()
+ + ") has been thrown: \"" + stmt + "\"", ex, false));
}
}
}
Modified: chemistry/opencmis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/pom.xml?rev=1816057&r1=1816056&r2=1816057&view=diff
==============================================================================
--- chemistry/opencmis/trunk/pom.xml (original)
+++ chemistry/opencmis/trunk/pom.xml Wed Nov 22 14:10:23 2017
@@ -124,8 +124,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compile.source>1.7</maven.compile.source>
- <maven.compile.target>1.7</maven.compile.target>
+ <maven.compile.source>1.8</maven.compile.source>
+ <maven.compile.target>1.8</maven.compile.target>
<docs.start.url>https://chemistry.apache.org/java/opencmis.html</docs.start.url>
<docs.download.directory>${project.build.directory}/downloaded-site</docs.download.directory>
<!--
@@ -148,17 +148,17 @@
<site.staging.url>${site.staging.protocol}://${site.staging.host}${site.staging.folder}</site.staging.url>
<parentBasedir>${project.basedir}</parentBasedir>
- <woodstox.version>4.4.1</woodstox.version>
- <osgi.version>5.0.0</osgi.version>
+ <woodstox.version>5.0.3</woodstox.version>
+ <osgi.version>6.0.0</osgi.version>
<felix.plugin.version>3.3.0</felix.plugin.version>
<junit.version>4.12</junit.version>
- <surefire.version>2.19.1</surefire.version>
- <failsafe.version>2.19.1</failsafe.version>
+ <surefire.version>2.20.1</surefire.version>
+ <failsafe.version>2.20.1</failsafe.version>
<jacoco.version>0.7.5.201505241946</jacoco.version>
<slf4j.version>1.7.25</slf4j.version>
- <log4j.version>2.6.1</log4j.version>
+ <log4j.version>2.9.0</log4j.version>
<apacheclient.version>4.2.6</apacheclient.version>
- <cxf.version>3.1.14</cxf.version>
+ <cxf.version>3.2.1</cxf.version>
<okhttp.version>3.8.1</okhttp.version>
</properties>