[Git][java-team/undertow][master] 3 commits: New upstream version 2.2.2

Markus Koschany gitlab at salsa.debian.org
Sun Oct 11 14:20:22 BST 2020



Markus Koschany pushed to branch master at Debian Java Maintainers / undertow


Commits:
10c92ad5 by Markus Koschany at 2020-10-11T14:37:57+02:00
New upstream version 2.2.2
- - - - -
e7873697 by Markus Koschany at 2020-10-11T14:38:05+02:00
Update upstream source from tag 'upstream/2.2.2'

Update to upstream version '2.2.2'
with Debian dir a3d42d34d6ed3b2cdd5ef9eb9932ee2760ca2314
- - - - -
b879ad75 by Markus Koschany at 2020-10-11T14:38:29+02:00
Update changelog

- - - - -


18 changed files:

- benchmarks/pom.xml
- core/pom.xml
- core/src/main/java/io/undertow/protocols/alpn/JDK8HackAlpnProvider.java
- core/src/main/java/io/undertow/protocols/alpn/JDK9AlpnProvider.java
- core/src/main/java/io/undertow/server/HttpServerExchange.java
- core/src/main/java/io/undertow/server/OverridableHashSet.java → core/src/main/java/io/undertow/server/OverridableTreeSet.java
- core/src/main/java/io/undertow/server/handlers/Cookie.java
- core/src/main/java/io/undertow/server/handlers/CookieImpl.java
- coverage-report/pom.xml
- debian/changelog
- dist/pom.xml
- examples/pom.xml
- parser-generator/pom.xml
- pom.xml
- servlet/pom.xml
- servlet/src/main/java/io/undertow/servlet/attribute/ServletRequestURLAttribute.java
- servlet/src/main/java/io/undertow/servlet/spec/ServletCookieAdaptor.java
- websockets-jsr/pom.xml


Changes:

=====================================
benchmarks/pom.xml
=====================================
@@ -25,11 +25,11 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <artifactId>undertow-benchmarks</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow Benchmarks</name>
 


=====================================
core/pom.xml
=====================================
@@ -25,12 +25,12 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-core</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow Core</name>
 


=====================================
core/src/main/java/io/undertow/protocols/alpn/JDK8HackAlpnProvider.java
=====================================
@@ -50,7 +50,7 @@ public class JDK8HackAlpnProvider implements ALPNProvider {
 
     @Override
     public int getPriority() {
-        return 200;
+        return 300;
     }
 
     @Override


=====================================
core/src/main/java/io/undertow/protocols/alpn/JDK9AlpnProvider.java
=====================================
@@ -43,9 +43,6 @@ public class JDK9AlpnProvider implements ALPNProvider {
     private static final String JDK8_SUPPORT_PROPERTY = "io.undertow.protocols.alpn.jdk8";
 
     static {
-        // This property must be checked outside of the privileged action as the user should explicitly provide read
-        // access to it. A value of true is the only supported value.
-        final boolean addSupportIfExists = Boolean.getBoolean(JDK8_SUPPORT_PROPERTY);
         JDK_9_ALPN_METHODS = AccessController.doPrivileged(new PrivilegedAction<JDK9ALPNMethods>() {
             @Override
             public JDK9ALPNMethods run() {
@@ -61,9 +58,12 @@ public class JDK9AlpnProvider implements ALPNProvider {
                     }
                     // There was a backport of the ALPN support to Java 8 in rev 251. If a non-JDK implementation of the
                     // SSLEngine is used these methods throw an UnsupportedOperationException by default. However the
-                    // methods would exist and could result in issues. These methods can still be used by providing the
-                    // io.undertow.protocols.alpn.jdk8=true system property and support for Java 8 known in the
-                    // SSLEngine implementation being provided.
+                    // methods would exist and could result in issues. By default it seems most JDK's have a working
+                    // implementation. However since this was introduced in a micro release we should have a way to
+                    // disable this feature. Setting the io.undertow.protocols.alpn.jdk8 to false will workaround the
+                    // possible issue where the SSLEngine does not have an implementation of these methods.
+                    final String value = System.getProperty(JDK8_SUPPORT_PROPERTY);
+                    final boolean addSupportIfExists = value == null || value.trim().isEmpty() || Boolean.parseBoolean(value);
                     if (vmVersion > 8 || addSupportIfExists) {
                         Method setApplicationProtocols = SSLParameters.class.getMethod("setApplicationProtocols", String[].class);
                         Method getApplicationProtocol = SSLEngine.class.getMethod("getApplicationProtocol");
@@ -127,7 +127,7 @@ public class JDK9AlpnProvider implements ALPNProvider {
 
     @Override
     public int getPriority() {
-        return 300;
+        return 200;
     }
 
     @Override


=====================================
core/src/main/java/io/undertow/server/HttpServerExchange.java
=====================================
@@ -1184,7 +1184,7 @@ public final class HttpServerExchange extends AbstractAttachable {
      */
     public Iterable<Cookie> requestCookies() {
         if (requestCookies == null) {
-            Set<Cookie> requestCookiesParam = new OverridableHashSet<>();
+            Set<Cookie> requestCookiesParam = new OverridableTreeSet<>();
             requestCookies = new DelegatingIterable<>(requestCookiesParam);
             Cookies.parseRequestCookies(
                     getConnection().getUndertowOptions().get(UndertowOptions.MAX_COOKIES, 200),
@@ -1234,7 +1234,7 @@ public final class HttpServerExchange extends AbstractAttachable {
      */
     public Iterable<Cookie> responseCookies() {
         if (responseCookies == null) {
-            responseCookies = new DelegatingIterable<>(new OverridableHashSet<>());
+            responseCookies = new DelegatingIterable<>(new OverridableTreeSet<>());
         }
         return responseCookies;
     }


=====================================
core/src/main/java/io/undertow/server/OverridableHashSet.java → core/src/main/java/io/undertow/server/OverridableTreeSet.java
=====================================
@@ -17,12 +17,12 @@
  */
 package io.undertow.server;
 
-import java.util.HashSet;
+import java.util.TreeSet;
 
 /**
  * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
  */
-final class OverridableHashSet<T> extends HashSet<T> {
+final class OverridableTreeSet<T> extends TreeSet<T> {
     @Override
     public boolean add(final T o) {
         // always override previous value


=====================================
core/src/main/java/io/undertow/server/handlers/Cookie.java
=====================================
@@ -26,7 +26,7 @@ import java.util.Date;
  * @see io.undertow.server.Connectors
  * @author Stuart Douglas
  */
-public interface Cookie {
+public interface Cookie extends Comparable {
 
     String getName();
 
@@ -85,4 +85,31 @@ public interface Cookie {
     default Cookie setSameSiteMode(final String mode) {
         throw new UnsupportedOperationException("Not implemented");
     }
+
+    @Override
+    default int compareTo(final Object other) {
+        final Cookie o = (Cookie) other;
+        int retVal = 0;
+
+        // compare names
+        if (getName() == null && o.getName() != null) return -1;
+        if (getName() != null && o.getName() == null) return 1;
+        retVal = (getName() == null && o.getName() == null) ? 0 : getName().compareTo(o.getName());
+        if (retVal != 0) return retVal;
+
+        // compare paths
+        if (getPath() == null && o.getPath() != null) return -1;
+        if (getPath() != null && o.getPath() == null) return 1;
+        retVal = (getPath() == null && o.getPath() == null) ? 0 : getPath().compareTo(o.getPath());
+        if (retVal != 0) return retVal;
+
+        // compare domains
+        if (getDomain() == null && o.getDomain() != null) return -1;
+        if (getDomain() != null && o.getDomain() == null) return 1;
+        retVal = (getDomain() == null && o.getDomain() == null) ? 0 : getDomain().compareTo(o.getDomain());
+        if (retVal != 0) return retVal;
+
+        return 0; // equal
+    }
+
 }


=====================================
core/src/main/java/io/undertow/server/handlers/CookieImpl.java
=====================================
@@ -188,8 +188,8 @@ public class CookieImpl implements Cookie {
     @Override
     public final boolean equals(final Object other) {
         if (other == this) return true;
-        if (!(other instanceof CookieImpl)) return false;
-        final CookieImpl o = (CookieImpl) other;
+        if (!(other instanceof Cookie)) return false;
+        final Cookie o = (Cookie) other;
         // compare names
         if (getName() == null && o.getName() != null) return false;
         if (getName() != null && !getName().equals(o.getName())) return false;
@@ -203,6 +203,11 @@ public class CookieImpl implements Cookie {
         return true;
     }
 
+    @Override
+    public final int compareTo(final Object other) {
+        return Cookie.super.compareTo(other);
+    }
+
     @Override
     public final String toString() {
         return "{CookieImpl@" + System.identityHashCode(this) + " name=" + getName() + " path=" + getPath() + " domain=" + getDomain() + "}";


=====================================
coverage-report/pom.xml
=====================================
@@ -3,7 +3,7 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
     <artifactId>undertow-coverage-report</artifactId>
     <name>Undertow Test Coverage Report</name>


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+undertow (2.2.2-1) unstable; urgency=medium
+
+  * New upstream version 2.2.2.
+
+ -- Markus Koschany <apo at debian.org>  Sun, 11 Oct 2020 14:38:18 +0200
+
 undertow (2.2.0-1) unstable; urgency=medium
 
   * New upstream version 2.2.0.


=====================================
dist/pom.xml
=====================================
@@ -25,12 +25,12 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-dist</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow: Distribution</name>
 


=====================================
examples/pom.xml
=====================================
@@ -25,12 +25,12 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-examples</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow Examples</name>
 


=====================================
parser-generator/pom.xml
=====================================
@@ -25,12 +25,12 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-parser-generator</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow Parser Generator</name>
     <description>An annotation processor that is used to generate the HTTP parser</description>


=====================================
pom.xml
=====================================
@@ -28,7 +28,7 @@
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-parent</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow</name>
     <description>Undertow</description>


=====================================
servlet/pom.xml
=====================================
@@ -25,12 +25,12 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-servlet</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow Servlet</name>
 


=====================================
servlet/src/main/java/io/undertow/servlet/attribute/ServletRequestURLAttribute.java
=====================================
@@ -49,11 +49,11 @@ public class ServletRequestURLAttribute implements ExchangeAttribute {
         if (src == null) {
             return RequestURLAttribute.INSTANCE.readAttribute(exchange);
         }
-        String uri = (String) src.getServletRequest().getAttribute(RequestDispatcher.ERROR_REQUEST_URI);
+        String uri = (String) src.getServletRequest().getAttribute(RequestDispatcher.FORWARD_REQUEST_URI);
         if (uri != null) {
             return uri;
         }
-        uri = (String) src.getServletRequest().getAttribute(RequestDispatcher.FORWARD_REQUEST_URI);
+        uri = (String) src.getServletRequest().getAttribute(RequestDispatcher.ERROR_REQUEST_URI);
         if (uri != null) {
             return uri;
         }


=====================================
servlet/src/main/java/io/undertow/servlet/spec/ServletCookieAdaptor.java
=====================================
@@ -198,8 +198,8 @@ public class ServletCookieAdaptor implements Cookie {
     @Override
     public final boolean equals(final Object other) {
         if (other == this) return true;
-        if (!(other instanceof ServletCookieAdaptor)) return false;
-        final ServletCookieAdaptor o = (ServletCookieAdaptor) other;
+        if (!(other instanceof Cookie)) return false;
+        final Cookie o = (Cookie) other;
         // compare names
         if (getName() == null && o.getName() != null) return false;
         if (getName() != null && !getName().equals(o.getName())) return false;
@@ -213,6 +213,11 @@ public class ServletCookieAdaptor implements Cookie {
         return true;
     }
 
+    @Override
+    public final int compareTo(final Object other) {
+        return Cookie.super.compareTo(other);
+    }
+
     @Override
     public final String toString() {
         return "{ServletCookieAdaptor@" + System.identityHashCode(this) + " name=" + getName() + " path=" + getPath() + " domain=" + getDomain() + "}";


=====================================
websockets-jsr/pom.xml
=====================================
@@ -25,12 +25,12 @@
     <parent>
         <groupId>io.undertow</groupId>
         <artifactId>undertow-parent</artifactId>
-        <version>2.2.0.Final</version>
+        <version>2.2.2.Final</version>
     </parent>
 
     <groupId>io.undertow</groupId>
     <artifactId>undertow-websockets-jsr</artifactId>
-    <version>2.2.0.Final</version>
+    <version>2.2.2.Final</version>
 
     <name>Undertow WebSockets JSR356 implementations</name>
 



View it on GitLab: https://salsa.debian.org/java-team/undertow/-/compare/ad2d4b55f06f000eae561bcaa914bdded4255233...b879ad75767394d094617e5eb519d7db45fbd6c3

-- 
View it on GitLab: https://salsa.debian.org/java-team/undertow/-/compare/ad2d4b55f06f000eae561bcaa914bdded4255233...b879ad75767394d094617e5eb519d7db45fbd6c3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20201011/2aa02253/attachment.html>


More information about the pkg-java-commits mailing list