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

This commit is contained in:
Simone Bordet 2017-01-17 11:38:45 +01:00
commit f8e3b1f9c2
6 changed files with 45 additions and 19 deletions

View File

@ -44,7 +44,8 @@ public class JDK9ClientALPNProcessor implements ALPNProcessor.Client
try try
{ {
ALPN.ClientProvider provider = (ALPN.ClientProvider)ALPN.get(sslEngine); ALPN.ClientProvider provider = (ALPN.ClientProvider)ALPN.get(sslEngine);
provider.selected(sslEngine.getApplicationProtocol()); if (provider != null)
provider.selected(sslEngine.getApplicationProtocol());
} }
catch (SSLException x) catch (SSLException x)
{ {

View File

@ -46,7 +46,7 @@ public class JDK9ServerALPNProcessor implements ALPNProcessor.Server, SslHandsha
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
LOG.debug("ALPN selecting among client{}", protocols); LOG.debug("ALPN selecting among client{}", protocols);
ALPN.ServerProvider provider = (ALPN.ServerProvider)ALPN.remove(sslEngine); ALPN.ServerProvider provider = (ALPN.ServerProvider)ALPN.remove(sslEngine);
return provider.select(protocols); return provider == null ? "" : provider.select(protocols);
} }
catch (SSLException x) catch (SSLException x)
{ {

View File

@ -55,6 +55,25 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1.9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles> </profiles>
<dependencies> <dependencies>

View File

@ -37,7 +37,7 @@
<profiles> <profiles>
<profile> <profile>
<id>jdk9</id> <id>jdk8</id>
<activation> <activation>
<jdk>[1.8,1.9)</jdk> <jdk>[1.8,1.9)</jdk>
</activation> </activation>

View File

@ -32,15 +32,13 @@
<version>${exam.version}</version> <version>${exam.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Use the forked container so we can pass it system properties eg for alpn -->
<!-- use the forked container so we can pass it system properties eg for alpn -->
<dependency> <dependency>
<groupId>org.ops4j.pax.exam</groupId> <groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-forked</artifactId> <artifactId>pax-exam-container-forked</artifactId>
<version>${exam.version}</version> <version>${exam.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.ops4j.pax.exam</groupId> <groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId> <artifactId>pax-exam-junit4</artifactId>
@ -126,7 +124,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.osgi</groupId> <groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-httpservice</artifactId> <artifactId>jetty-httpservice</artifactId>
@ -139,14 +136,12 @@
<artifactId>jetty-osgi-servlet-api</artifactId> <artifactId>jetty-osgi-servlet-api</artifactId>
<version>3.1.0.M3</version> <version>3.1.0.M3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.geronimo.specs</groupId> <groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId> <artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.geronimo.specs</groupId> <groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId> <artifactId>geronimo-atinject_1.0_spec</artifactId>
@ -159,7 +154,6 @@
<version>1.0.1</version> <version>1.0.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.web</groupId> <groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId> <artifactId>javax.servlet.jsp.jstl</artifactId>
@ -183,7 +177,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.orbit</groupId> <groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId> <artifactId>javax.servlet.jsp.jstl</artifactId>
@ -330,7 +323,6 @@
<artifactId>jetty-schemas</artifactId> <artifactId>jetty-schemas</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-plus</artifactId> <artifactId>jetty-plus</artifactId>
@ -346,7 +338,6 @@
<classifier>webbundle</classifier> <classifier>webbundle</classifier>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.tests</groupId> <groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-spec-webapp</artifactId> <artifactId>test-spec-webapp</artifactId>
@ -354,14 +345,12 @@
<type>war</type> <type>war</type>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.tests</groupId> <groupId>org.eclipse.jetty.tests</groupId>
<artifactId>test-container-initializer</artifactId> <artifactId>test-container-initializer</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.osgi</groupId> <groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>test-jetty-osgi-fragment</artifactId> <artifactId>test-jetty-osgi-fragment</artifactId>
@ -379,7 +368,6 @@
<artifactId>test-mock-resources</artifactId> <artifactId>test-mock-resources</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.osgi</groupId> <groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>test-jetty-osgi-context</artifactId> <artifactId>test-jetty-osgi-context</artifactId>
@ -404,14 +392,13 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<!-- No point defining -Xbootclasspath as the actual OSGi VM is run as a forked process by pax-exam --> <!-- No point defining -Xbootclasspath as the actual OSGi VM is run as a forked process by pax-exam -->
<!-- But we do pass the sys property of the alpn-boot jar so that it can be configued inside tests --> <!-- But we do pass the sys property of the alpn-boot jar so that it can be configured inside tests -->
<argLine>-Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar</argLine> <argLine>-Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar</argLine>
</configuration> </configuration>
</plugin> </plugin>
@ -458,5 +445,4 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
</project> </project>

View File

@ -56,6 +56,26 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1.9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-client</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles> </profiles>
<build> <build>