- merge with master - codereview issues fixed
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/512c4216 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/512c4216 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/512c4216 Branch: refs/heads/WICKET-6563 Commit: 512c4216689a72931f101f7e59b81ab1ccc37b11 Parents: ce3c7c7 Author: renoth <johannes.ren...@gmx.de> Authored: Fri Sep 7 07:55:44 2018 +0200 Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Committed: Wed Sep 26 16:18:00 2018 +0300 ---------------------------------------------------------------------- pom.xml | 36 ++++++++++---------- testing/wicket-common-tests/pom.xml | 10 +++--- wicket-bean-validation/pom.xml | 9 +++-- wicket-core/pom.xml | 19 +++++++---- .../apache/wicket/util/tester/WicketTester.java | 5 +-- .../wicket-native-websocket-core/pom.xml | 1 - wicket-util/pom.xml | 10 +++--- .../markup/xhtml/WellFormedXmlTestCase.java | 20 ++++++----- 8 files changed, 60 insertions(+), 50 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 7e74e89..c3275ac 100644 --- a/pom.xml +++ b/pom.xml @@ -495,30 +495,12 @@ </exclusions> </dependency> <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-engine</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-params</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>3.11.0</version> <scope>test</scope> </dependency> <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>java-hamcrest</artifactId> - <version>2.0.0.0</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-jmx</artifactId> <version>${jetty.version}</version> @@ -573,6 +555,24 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.vintage</groupId> + <artifactId>junit-vintage-engine</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito.version}</version> http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/testing/wicket-common-tests/pom.xml ---------------------------------------------------------------------- diff --git a/testing/wicket-common-tests/pom.xml b/testing/wicket-common-tests/pom.xml index ecb8402..adbfd7e 100644 --- a/testing/wicket-common-tests/pom.xml +++ b/testing/wicket-common-tests/pom.xml @@ -34,11 +34,6 @@ <dependencies> <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-engine</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.apache.wicket</groupId> <artifactId>wicket-auth-roles</artifactId> <scope>test</scope> @@ -109,6 +104,11 @@ <artifactId>wicket-velocity</artifactId> <scope>test</scope> </dependency> + <dependency> + <artifactId>junit-jupiter-engine</artifactId> + <groupId>org.junit.jupiter</groupId> + <scope>test</scope> + </dependency> </dependencies> <build> <plugins> http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/wicket-bean-validation/pom.xml ---------------------------------------------------------------------- diff --git a/wicket-bean-validation/pom.xml b/wicket-bean-validation/pom.xml index f1240cd..99e6376 100644 --- a/wicket-bean-validation/pom.xml +++ b/wicket-bean-validation/pom.xml @@ -25,11 +25,6 @@ <artifactId>wicket-core</artifactId> </dependency> <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-engine</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.glassfish.web</groupId> <artifactId>el-impl</artifactId> </dependency> @@ -37,5 +32,9 @@ <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/wicket-core/pom.xml ---------------------------------------------------------------------- diff --git a/wicket-core/pom.xml b/wicket-core/pom.xml index 7963d34..faac57b 100644 --- a/wicket-core/pom.xml +++ b/wicket-core/pom.xml @@ -27,7 +27,7 @@ <packaging>bundle</packaging> <name>Wicket Core</name> <description> - Wicket is a Java web application framework that takes simplicity, + Wicket is a Java web application framework that takes simplicity, separation of concerns and ease of development to a whole new level. Wicket pages can be mocked up, previewed and later revised using standard WYSIWYG HTML design tools. Dynamic content processing and @@ -37,17 +37,16 @@ </description> <dependencies> <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-junit</artifactId> + </dependency> + <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> - <!-- provided because of WicketTester --> <scope>provided</scope> <optional>true</optional> </dependency> <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-junit</artifactId> - </dependency> - <dependency> <groupId>com.github.openjson</groupId> <artifactId>openjson</artifactId> </dependency> @@ -97,6 +96,14 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + </dependency> + <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> </dependency> http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java index 651c0ef..74bab6c 100644 --- a/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java +++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java @@ -18,6 +18,7 @@ package org.apache.wicket.util.tester; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -960,7 +961,7 @@ public class WicketTester extends BaseWicketTester public void executeListener(final Class<?> testClass, final Component component, final String filename) throws Exception { - assert(component != null); + assertNotNull(component); log.info("=== " + testClass.getName() + " : " + component.getPageRelativePath() + " ==="); @@ -978,7 +979,7 @@ public class WicketTester extends BaseWicketTester public void executeBehavior(final Class<?> testClass, final AbstractAjaxBehavior behavior, final String filename) throws Exception { - assert(behavior != null); + assertNotNull(behavior); log.info("=== " + testClass.getName() + " : " + behavior.toString() + " ==="); http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/wicket-native-websocket/wicket-native-websocket-core/pom.xml ---------------------------------------------------------------------- diff --git a/wicket-native-websocket/wicket-native-websocket-core/pom.xml b/wicket-native-websocket/wicket-native-websocket-core/pom.xml index 090faf1..53eaa11 100644 --- a/wicket-native-websocket/wicket-native-websocket-core/pom.xml +++ b/wicket-native-websocket/wicket-native-websocket-core/pom.xml @@ -39,7 +39,6 @@ <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> - <scope>test</scope> </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/wicket-util/pom.xml ---------------------------------------------------------------------- diff --git a/wicket-util/pom.xml b/wicket-util/pom.xml index d5777f8..f7ad0b1 100755 --- a/wicket-util/pom.xml +++ b/wicket-util/pom.xml @@ -28,11 +28,6 @@ <name>Wicket Util</name> <dependencies> <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-engine</artifactId> - <scope>compile</scope> - </dependency> - <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> </dependency> @@ -44,5 +39,10 @@ <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>compile</scope> + </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/wicket/blob/512c4216/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java ---------------------------------------------------------------------- diff --git a/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java b/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java index 71f8357..9af193a 100644 --- a/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java +++ b/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java @@ -16,18 +16,23 @@ */ package org.apache.wicket.util.markup.xhtml; -import org.junit.jupiter.api.Test; -import org.xml.sax.*; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.util.HashMap; import java.util.Map; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.junit.jupiter.api.Test; +import org.xml.sax.EntityResolver; +import org.xml.sax.ErrorHandler; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + /** * Usable by tests to check that the html markup files are well formed. * @@ -148,8 +153,7 @@ public class WellFormedXmlTestCase } @Override - public InputSource resolveEntity(String publicId, String systemId) - { + public InputSource resolveEntity(String publicId, String systemId) { String uri = systemIdToUri.get(systemId); if (uri != null) {