This is an automated email from the ASF dual-hosted git repository. elecharny pushed a commit to branch 2.0.X in repository https://gitbox.apache.org/repos/asf/mina.git
The following commit(s) were added to refs/heads/2.0.X by this push: new 3bd0823 Some more backported fixes 3bd0823 is described below commit 3bd08234874d48d40962984f0fb4c1cd55e3e743 Author: emmanuel lecharny <elecha...@apache.org> AuthorDate: Tue Feb 8 19:04:02 2022 +0100 Some more backported fixes --- .../org/apache/mina/transport/AbstractBindTest.java | 3 +++ mina-core/src/test/resources/log4j.properties | 2 +- pom.xml | 21 +++++++++++++++++---- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/mina-core/src/test/java/org/apache/mina/transport/AbstractBindTest.java b/mina-core/src/test/java/org/apache/mina/transport/AbstractBindTest.java index b637102..ae69fcb 100644 --- a/mina-core/src/test/java/org/apache/mina/transport/AbstractBindTest.java +++ b/mina-core/src/test/java/org/apache/mina/transport/AbstractBindTest.java @@ -43,6 +43,7 @@ import org.apache.mina.transport.socket.SocketAcceptor; import org.apache.mina.transport.socket.SocketSessionConfig; import org.apache.mina.util.AvailablePortFinder; import org.junit.After; +import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; @@ -160,10 +161,12 @@ public abstract class AbstractBindTest { bind(true); for (int i = 0; i < 1024; i++) { + Assert.assertTrue("Bound addresses is empty", acceptor.getLocalAddresses().size() > 0); acceptor.unbind(); Thread.sleep(2); + Assert.assertTrue("Bound addresses is not empty", acceptor.getLocalAddresses().size() == 0); acceptor.bind(); } } diff --git a/mina-core/src/test/resources/log4j.properties b/mina-core/src/test/resources/log4j.properties index b4d371d..d79de52 100644 --- a/mina-core/src/test/resources/log4j.properties +++ b/mina-core/src/test/resources/log4j.properties @@ -16,7 +16,7 @@ ############################################################################# # Please don't modify the log level until we reach to acceptable test coverage. # It's very useful when I test examples manually. -log4j.rootCategory=INFO, stdout +log4j.rootCategory=ERROR, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout diff --git a/pom.xml b/pom.xml index 57561e5..ddbd6c4 100644 --- a/pom.xml +++ b/pom.xml @@ -158,7 +158,10 @@ <!-- OSGi minimum versions --> <osgi-min-version.slf4j.api>1.7</osgi-min-version.slf4j.api> - </properties> + + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> + </properties> <modules> <module>mina-legal</module> @@ -419,6 +422,16 @@ </modules> </profile> + <!-- use JDK8 compilation for JDK9+ compiler --> + <profile> + <id>java-8-compilation</id> + <activation> + <jdk>[9,)</jdk> + </activation> + <properties> + <maven.compiler.release>8</maven.compiler.release> + </properties> + </profile> </profiles> <build> @@ -460,10 +473,10 @@ <artifactId>maven-compiler-plugin</artifactId> <version>${version.compiler.plugin}</version> <configuration> - <source>1.7</source> - <target>1.7</target> + <source>1.8</source> + <target>1.8</target> <optimize>true</optimize> - <showDeprecations>true</showDeprecations> + <showDeprecation>true</showDeprecation> <encoding>ISO-8859-1</encoding> </configuration> </plugin>