Merged branch 'jetty-9.4.x' into 'master'.

This commit is contained in:
Simone Bordet 2017-08-16 12:54:03 +02:00
commit c53f4cdd63
7 changed files with 23 additions and 29 deletions

View File

@ -20,8 +20,6 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>8</source>
<target>8</target>
<compilerArgs> <compilerArgs>
<arg>-profile</arg> <arg>-profile</arg>
<arg>compact3</arg> <arg>compact3</arg>

View File

@ -24,6 +24,7 @@
<configuration> <configuration>
<source>1.9</source> <source>1.9</source>
<target>1.9</target> <target>1.9</target>
<release>9</release>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -23,6 +23,7 @@
<configuration> <configuration>
<source>1.9</source> <source>1.9</source>
<target>1.9</target> <target>1.9</target>
<release>9</release>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -30,8 +30,6 @@ import org.junit.Assume;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import sun.security.provider.Sun;
public class ClasspathPatternTest public class ClasspathPatternTest
{ {
private final ClasspathPattern _pattern = new ClasspathPattern(); private final ClasspathPattern _pattern = new ClasspathPattern();
@ -134,7 +132,6 @@ public class ClasspathPatternTest
ClasspathPattern pattern = new ClasspathPattern(); ClasspathPattern pattern = new ClasspathPattern();
pattern.include("something"); pattern.include("something");
Assert.assertThat(pattern.match(String.class), Matchers.is(false)); Assert.assertThat(pattern.match(String.class), Matchers.is(false));
Assert.assertThat(pattern.match(Sun.class), Matchers.is(false));
Assert.assertThat(pattern.match(Test.class), Matchers.is(false)); Assert.assertThat(pattern.match(Test.class), Matchers.is(false));
Assert.assertThat(pattern.match(JDK.class), Matchers.is(false)); Assert.assertThat(pattern.match(JDK.class), Matchers.is(false));
Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(false)); Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(false));
@ -146,15 +143,12 @@ public class ClasspathPatternTest
pattern.include(loc_junit.toString(), loc_test.toString()); pattern.include(loc_junit.toString(), loc_test.toString());
Assert.assertThat(pattern.match(String.class), Matchers.is(true)); Assert.assertThat(pattern.match(String.class), Matchers.is(true));
Assert.assertThat(pattern.match(Sun.class), Matchers.is(true));
Assert.assertThat(pattern.match(Test.class), Matchers.is(true)); Assert.assertThat(pattern.match(Test.class), Matchers.is(true));
Assert.assertThat(pattern.match(JDK.class), Matchers.is(false)); Assert.assertThat(pattern.match(JDK.class), Matchers.is(false));
Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(true)); Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(true));
// exclude by package name still works pattern.add("-java.lang.String");
pattern.add("-sun.security.provider.Sun"); Assert.assertThat(pattern.match(String.class), Matchers.is(false));
Assert.assertThat(pattern.match(String.class), Matchers.is(true));
Assert.assertThat(pattern.match(Sun.class), Matchers.is(false));
Assert.assertThat(pattern.match(Test.class), Matchers.is(true)); Assert.assertThat(pattern.match(Test.class), Matchers.is(true));
Assert.assertThat(pattern.match(JDK.class), Matchers.is(false)); Assert.assertThat(pattern.match(JDK.class), Matchers.is(false));
Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(true)); Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(true));
@ -184,7 +178,6 @@ public class ClasspathPatternTest
pattern.include("."); pattern.include(".");
Assert.assertThat(pattern.match(String.class), Matchers.is(true)); Assert.assertThat(pattern.match(String.class), Matchers.is(true));
Assert.assertThat(pattern.match(Sun.class), Matchers.is(true));
Assert.assertThat(pattern.match(Test.class), Matchers.is(true)); Assert.assertThat(pattern.match(Test.class), Matchers.is(true));
Assert.assertThat(pattern.match(JDK.class), Matchers.is(true)); Assert.assertThat(pattern.match(JDK.class), Matchers.is(true));
Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(true)); Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(true));
@ -196,7 +189,6 @@ public class ClasspathPatternTest
pattern.exclude(loc_junit.toString(), loc_test.toString()); pattern.exclude(loc_junit.toString(), loc_test.toString());
Assert.assertThat(pattern.match(String.class), Matchers.is(false)); Assert.assertThat(pattern.match(String.class), Matchers.is(false));
Assert.assertThat(pattern.match(Sun.class), Matchers.is(false));
Assert.assertThat(pattern.match(Test.class), Matchers.is(false)); Assert.assertThat(pattern.match(Test.class), Matchers.is(false));
Assert.assertThat(pattern.match(JDK.class), Matchers.is(true)); Assert.assertThat(pattern.match(JDK.class), Matchers.is(true));
Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(false)); Assert.assertThat(pattern.match(ClasspathPatternTest.class), Matchers.is(false));

16
pom.xml
View File

@ -1487,6 +1487,22 @@
<alpn.version>8.1.11.v20170118</alpn.version> <alpn.version>8.1.11.v20170118</alpn.version>
</properties> </properties>
</profile> </profile>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1.9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
<issueManagement> <issueManagement>

View File

@ -13,12 +13,6 @@
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<verbose>false</verbose>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.felix</groupId> <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId> <artifactId>maven-bundle-plugin</artifactId>

View File

@ -5,23 +5,15 @@
<artifactId>test-servlet-spec-parent</artifactId> <artifactId>test-servlet-spec-parent</artifactId>
<version>10.0.0-SNAPSHOT</version> <version>10.0.0-SNAPSHOT</version>
</parent> </parent>
<name>Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar</name> <name>Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar</name>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-web-fragment</artifactId> <artifactId>test-web-fragment</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
<bundle-symbolic-name>${project.groupId}.fragment</bundle-symbolic-name> <bundle-symbolic-name>${project.groupId}.fragment</bundle-symbolic-name>
</properties> </properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>