Upgraded dependencies - servlet, metro, grizzly

- servlet6
- grizzly 4 snapshot
- webservices 4 snapshot

Signed-off-by: David Matějček <dmatej@seznam.cz>
diff --git a/appserver/web/web-core/src/main/java/org/apache/catalina/core/Constants.java b/appserver/web/web-core/src/main/java/org/apache/catalina/core/Constants.java
index 90eeeeb..4fa789e 100644
--- a/appserver/web/web-core/src/main/java/org/apache/catalina/core/Constants.java
+++ b/appserver/web/web-core/src/main/java/org/apache/catalina/core/Constants.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Contributors to Eclipse Foundation.
+ * Copyright (c) 2021-2022 Contributors to Eclipse Foundation.
  * Copyright (c) 1997-2022 Oracle and/or its affiliates. All rights reserved.
  * Copyright 2004 The Apache Software Foundation
  *
@@ -25,12 +25,19 @@
     public static final int MAJOR_VERSION = 6;
     public static final int MINOR_VERSION = 0;
 
-    public static final String JSP_SERVLET_CLASS =
-        "org.glassfish.wasp.servlet.JspServlet";
+    public static final String JSP_SERVLET_CLASS = "org.glassfish.wasp.servlet.JspServlet";
 
     public static final String JSP_SERVLET_NAME = "jsp";
 
     public static final String DEFAULT_SERVLET_NAME = "default";
 
     public static final String IS_DEFAULT_ERROR_PAGE_ENABLED_INIT_PARAM = "org.glassfish.web.isDefaultErrorPageEnabled";
+
+    public static final String COOKIE_COMMENT_ATTR = "Comment";
+    public static final String COOKIE_DOMAIN_ATTR = "Domain";
+    public static final String COOKIE_MAX_AGE_ATTR = "Max-Age";
+    public static final String COOKIE_PATH_ATTR = "Path";
+    public static final String COOKIE_SECURE_ATTR = "Secure";
+    public static final String COOKIE_HTTP_ONLY_ATTR = "HttpOnly";
+    public static final String COOKIE_SAME_SITE_ATTR = "SameSite";
 }
diff --git a/appserver/web/web-core/src/main/java/org/apache/catalina/core/SessionCookieConfigImpl.java b/appserver/web/web-core/src/main/java/org/apache/catalina/core/SessionCookieConfigImpl.java
index 2636e5b..5a6f8a9 100644
--- a/appserver/web/web-core/src/main/java/org/apache/catalina/core/SessionCookieConfigImpl.java
+++ b/appserver/web/web-core/src/main/java/org/apache/catalina/core/SessionCookieConfigImpl.java
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2022 Contributors to the Eclipse Foundation
  * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -16,13 +17,14 @@
 
 package org.apache.catalina.core;
 
-import org.apache.catalina.Globals;
 import org.apache.catalina.LogFacade;
 
 import java.text.MessageFormat;
+import java.util.Collections;
 import java.util.Map;
 import java.util.ResourceBundle;
-import java.util.logging.Logger;
+import java.util.TreeMap;
+
 import jakarta.servlet.SessionCookieConfig;
 
 /**
@@ -31,14 +33,15 @@
  */
 public class SessionCookieConfigImpl implements SessionCookieConfig {
 
-    private String name;
-    private String domain;
-    private String path;
-    private String comment;
-    private boolean httpOnly = true;
-    private boolean secure;
-    private StandardContext ctx;
-    private int maxAge = -1;
+    private static final int DEFAULT_MAX_AGE = -1;
+    private static final boolean DEFAULT_HTTP_ONLY = false;
+    private static final boolean DEFAULT_SECURE = false;
+    private static final String DEFAULT_NAME = "JSESSIONID";
+
+    private String name = DEFAULT_NAME;
+
+    private final Map<String,String> attributes = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+    private final StandardContext ctx;
 
     private static final ResourceBundle rb = LogFacade.getLogger().getResourceBundle();
 
@@ -95,8 +98,7 @@
                                               new Object[] {"dnmain", ctx.getName()});
             throw new IllegalStateException(msg);
         }
-
-        this.domain = domain;
+        setAttribute(Constants.COOKIE_DOMAIN_ATTR, domain);
     }
 
 
@@ -106,7 +108,7 @@
      */
     @Override
     public String getDomain() {
-        return domain;
+        return getAttribute(Constants.COOKIE_DOMAIN_ATTR);
     }
 
 
@@ -124,8 +126,7 @@
                                               new Object[] {"path", ctx.getName()});
             throw new IllegalStateException(msg);
         }
-
-        this.path = path;
+        setAttribute(Constants.COOKIE_PATH_ATTR, path);
     }
 
 
@@ -137,7 +138,7 @@
      */
     @Override
     public String getPath() {
-        return path;
+        return getAttribute(Constants.COOKIE_PATH_ATTR);
     }
 
 
@@ -155,8 +156,7 @@
                                               new Object[] {"comment", ctx.getName()});
             throw new IllegalStateException(msg);
         }
-
-        this.comment = comment;
+        setAttribute(Constants.COOKIE_COMMENT_ATTR, comment);
     }
 
 
@@ -166,7 +166,7 @@
      */
     @Override
     public String getComment() {
-        return comment;
+        return getAttribute(Constants.COOKIE_COMMENT_ATTR);
     }
 
 
@@ -187,8 +187,7 @@
                                               new Object[] {"httpOnly", ctx.getName()});
             throw new IllegalStateException(msg);
         }
-
-        this.httpOnly = httpOnly;
+        setAttribute(Constants.COOKIE_HTTP_ONLY_ATTR, String.valueOf(httpOnly));
     }
 
 
@@ -199,7 +198,8 @@
      */
     @Override
     public boolean isHttpOnly() {
-        return httpOnly;
+        String value = getAttribute(Constants.COOKIE_HTTP_ONLY_ATTR);
+        return value == null ? DEFAULT_HTTP_ONLY : Boolean.parseBoolean(value);
     }
 
 
@@ -223,8 +223,7 @@
                                               new Object[] {"secure", ctx.getName()});
             throw new IllegalStateException(msg);
         }
-
-        this.secure = secure;
+        setAttribute(Constants.COOKIE_SECURE_ATTR, String.valueOf(secure));
     }
 
 
@@ -239,7 +238,8 @@
      */
     @Override
     public boolean isSecure() {
-        return secure;
+        String value = getAttribute(Constants.COOKIE_SECURE_ATTR);
+        return value == null ? DEFAULT_SECURE : Boolean.parseBoolean(value);
     }
 
 
@@ -250,35 +250,28 @@
                                               new Object[] {"maxAge", ctx.getName()});
             throw new IllegalStateException(msg);
         }
-
-        this.maxAge = maxAge;
+        setAttribute(Constants.COOKIE_MAX_AGE_ATTR, String.valueOf(maxAge));
     }
 
 
     @Override
     public int getMaxAge() {
-        return maxAge;
+        String value = getAttribute(Constants.COOKIE_MAX_AGE_ATTR);
+        return value == null ? DEFAULT_MAX_AGE : Integer.parseInt(value);
     }
 
-
     @Override
     public void setAttribute(String name, String value) {
-        // TODO IMPLEMENT!
-
+        this.attributes.put(name, value);
     }
 
-
     @Override
     public String getAttribute(String name) {
-        // TODO IMPLEMENT!
-        return null;
+        return this.attributes.get(name);
     }
 
-
     @Override
     public Map<String, String> getAttributes() {
-        // TODO IMPLEMENT!
-        return null;
+        return Collections.unmodifiableMap(this.attributes);
     }
-
 }
diff --git a/appserver/web/web-core/src/main/java/org/apache/catalina/core/StandardContext.java b/appserver/web/web-core/src/main/java/org/apache/catalina/core/StandardContext.java
index 0270c74..2f2d8f6 100644
--- a/appserver/web/web-core/src/main/java/org/apache/catalina/core/StandardContext.java
+++ b/appserver/web/web-core/src/main/java/org/apache/catalina/core/StandardContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Contributors to Eclipse Foundation.
+ * Copyright (c) 2021-2022 Contributors to Eclipse Foundation.
  * Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
  * Copyright 2004 The Apache Software Foundation
  *
@@ -18,50 +18,21 @@
 
 package org.apache.catalina.core;
 
-import static com.sun.logging.LogCleanerUtil.neutralizeForLog;
-import org.glassfish.grizzly.http.server.util.AlternateDocBase;
-import org.glassfish.grizzly.http.server.util.Mapper;
-import org.glassfish.grizzly.http.server.util.MappingData;
-import org.apache.catalina.*;
-import org.apache.catalina.deploy.*;
-import org.apache.catalina.loader.WebappLoader;
-import org.apache.catalina.session.ManagerBase;
-import org.apache.catalina.session.PersistentManagerBase;
-import org.apache.catalina.session.StandardManager;
-import org.apache.catalina.servlets.DefaultServlet;
-import org.apache.catalina.startup.ContextConfig;
-import org.apache.catalina.util.*;
-import org.apache.naming.ContextBindings;
-import org.apache.naming.resources.BaseDirContext;
-import org.apache.naming.resources.DirContextURLStreamHandler;
-import org.apache.naming.resources.FileDirContext;
-import org.apache.naming.resources.WebDirContext;
-import org.apache.naming.resources.ProxyDirContext;
-import org.apache.naming.resources.Resource;
-import org.apache.naming.resources.WARDirContext;
-import org.glassfish.hk2.classmodel.reflect.Types;
-import org.glassfish.web.loader.WebappClassLoader;
-import org.glassfish.web.loader.ServletContainerInitializerUtil;
-import org.glassfish.web.valve.GlassFishValve;
-
-import javax.management.*;
-import javax.naming.Binding;
-import javax.naming.NamingException;
-import javax.naming.directory.DirContext;
 import jakarta.servlet.*;
 import jakarta.servlet.descriptor.JspConfigDescriptor;
+import jakarta.servlet.http.HttpServletMapping;
 import jakarta.servlet.http.HttpSession;
 import jakarta.servlet.http.HttpSessionAttributeListener;
 import jakarta.servlet.http.HttpSessionIdListener;
 import jakarta.servlet.http.HttpSessionListener;
 import jakarta.servlet.http.HttpUpgradeHandler;
 
-import static java.util.logging.Level.SEVERE;
-import static org.apache.catalina.Globals.FACES_INITIALIZER;
-import static org.glassfish.web.loader.ServletContainerInitializerUtil.getInitializerList;
-import static org.glassfish.web.loader.ServletContainerInitializerUtil.getInterestList;
-
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.net.URLDecoder;
 import java.security.AccessController;
@@ -72,10 +43,52 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.logging.Level;
-import jakarta.servlet.http.HttpServletMapping;
+
+import javax.management.MBeanRegistrationException;
+import javax.management.MalformedObjectNameException;
+import javax.management.Notification;
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.ObjectName;
+import javax.naming.Binding;
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.catalina.*;
 import org.apache.catalina.connector.MappingImpl;
+import org.apache.catalina.deploy.*;
+import org.apache.catalina.loader.WebappLoader;
+import org.apache.catalina.servlets.DefaultServlet;
+import org.apache.catalina.session.ManagerBase;
+import org.apache.catalina.session.PersistentManagerBase;
+import org.apache.catalina.session.StandardManager;
+import org.apache.catalina.startup.ContextConfig;
+import org.apache.catalina.util.CharsetMapper;
+import org.apache.catalina.util.CustomObjectInputStream;
+import org.apache.catalina.util.ExtensionValidator;
+import org.apache.catalina.util.RequestUtil;
+import org.apache.catalina.util.URLEncoder;
+import org.apache.naming.ContextBindings;
+import org.apache.naming.resources.BaseDirContext;
+import org.apache.naming.resources.DirContextURLStreamHandler;
+import org.apache.naming.resources.FileDirContext;
+import org.apache.naming.resources.ProxyDirContext;
+import org.apache.naming.resources.Resource;
+import org.apache.naming.resources.WARDirContext;
+import org.apache.naming.resources.WebDirContext;
+import org.glassfish.grizzly.http.server.util.AlternateDocBase;
+import org.glassfish.grizzly.http.server.util.Mapper;
+import org.glassfish.grizzly.http.server.util.MappingData;
 import org.glassfish.grizzly.http.util.CharChunk;
 import org.glassfish.grizzly.http.util.MessageBytes;
+import org.glassfish.hk2.classmodel.reflect.Types;
+import org.glassfish.web.loader.WebappClassLoader;
+import org.glassfish.web.valve.GlassFishValve;
+
+import static com.sun.logging.LogCleanerUtil.neutralizeForLog;
+import static java.util.logging.Level.SEVERE;
+import static org.apache.catalina.Globals.FACES_INITIALIZER;
+import static org.glassfish.web.loader.ServletContainerInitializerUtil.getInitializerList;
+import static org.glassfish.web.loader.ServletContainerInitializerUtil.getInterestList;
 
 /**
  * Standard implementation of the <b>Context</b> interface.  Each
@@ -165,26 +178,26 @@
     /**
      * The list of instantiated application event listeners
      */
-    private List<EventListener> eventListeners =
-        new ArrayList<EventListener>();
+    private final List<EventListener> eventListeners =
+        new ArrayList<>();
 
     /**
      * The list of ServletContextListeners
      */
     protected ArrayList<ServletContextListener> contextListeners =
-        new ArrayList<ServletContextListener>();
+        new ArrayList<>();
 
     /**
      * The list of HttpSessionListeners
      */
-    private List<HttpSessionListener> sessionListeners =
-        new ArrayList<HttpSessionListener>();
+    private final List<HttpSessionListener> sessionListeners =
+        new ArrayList<>();
 
     /**
      * The set of application parameters defined for this application.
      */
-    private List<ApplicationParameter> applicationParameters =
-        new ArrayList<ApplicationParameter>();
+    private final List<ApplicationParameter> applicationParameters =
+        new ArrayList<>();
 
     /**
      * The application available flag for this Context.
@@ -229,8 +242,8 @@
     /**
      * The security constraints for this web application.
      */
-    private List<SecurityConstraint> constraints =
-        new ArrayList<SecurityConstraint>();
+    private final List<SecurityConstraint> constraints =
+        new ArrayList<>();
 
     /**
      * The ServletContext implementation associated with this Context.
@@ -294,8 +307,8 @@
     /**
      * Thread local data used during request dispatch.
      */
-    private ThreadLocal<DispatchData> dispatchData =
-        new ThreadLocal<DispatchData>();
+    private final ThreadLocal<DispatchData> dispatchData =
+        new ThreadLocal<>();
 
     /**
      * The document root for this web application.
@@ -306,8 +319,8 @@
      * The exception pages for this web application, keyed by fully qualified
      * class name of the Java exception.
      */
-    private Map<String, ErrorPage> exceptionPages =
-        new HashMap<String, ErrorPage>();
+    private final Map<String, ErrorPage> exceptionPages =
+        new HashMap<>();
 
     /**
      * The default error page (error page that was declared
@@ -319,32 +332,32 @@
      * The set of filter configurations (and associated filter instances) we
      * have initialized, keyed by filter name.
      */
-    private Map<String, FilterConfig> filterConfigs =
-        new HashMap<String, FilterConfig>();
+    private final Map<String, FilterConfig> filterConfigs =
+        new HashMap<>();
 
     /**
      * The set of filter definitions for this application, keyed by
      * filter name.
      */
-    private Map<String, FilterDef> filterDefs = new HashMap<String, FilterDef>();
+    private final Map<String, FilterDef> filterDefs = new HashMap<>();
 
     /**
      * The list of filter mappings for this application, in the order
      * they were defined in the deployment descriptor.
      */
-    private List<FilterMap> filterMaps = new ArrayList<FilterMap>();
+    private final List<FilterMap> filterMaps = new ArrayList<>();
 
     /**
      * The list of classnames of InstanceListeners that will be added
      * to each newly created Wrapper by <code>createWrapper()</code>.
      */
-    private ArrayList<String> instanceListeners = new ArrayList<String>();
+    private final ArrayList<String> instanceListeners = new ArrayList<>();
 
     /**
      * The set of already instantiated InstanceListeners that will be added
      * to each newly created Wrapper by <code>createWrapper()</code>.
      */
-    private List<InstanceListener> instanceListenerInstances = new ArrayList<InstanceListener>();
+    private final List<InstanceListener> instanceListenerInstances = new ArrayList<>();
 
     /**
      * The login configuration descriptor for this web application.
@@ -354,7 +367,7 @@
     /**
      * The mapper associated with this context.
      */
-    private Mapper mapper = new Mapper();
+    private final Mapper mapper = new Mapper();
 
     /**
      * The naming context listener for this web application.
@@ -369,18 +382,18 @@
     /**
      * The message destinations for this web application.
      */
-    private Map<String, MessageDestination> messageDestinations = new HashMap<String, MessageDestination>();
+    private final Map<String, MessageDestination> messageDestinations = new HashMap<>();
 
     /**
      * The MIME mappings for this web application, keyed by extension.
      */
-    private Map<String,String> mimeMappings = new HashMap<String,String>();
+    private final Map<String,String> mimeMappings = new HashMap<>();
 
     /**
      * The context initialization parameters for this web application,
      * keyed by name.
      */
-    private HashMap<String, String> parameters = new HashMap<String, String>();
+    private final HashMap<String, String> parameters = new HashMap<>();
 
     /**
      * The request processing pause flag (while reloading occurs)
@@ -440,18 +453,18 @@
      * The security role mappings for this application, keyed by role
      * name (as used within the application).
      */
-    private Map<String, String> roleMappings = new HashMap<String, String>();
+    private final Map<String, String> roleMappings = new HashMap<>();
 
     /**
      * The security roles for this application
      */
-    private List<String> securityRoles = new ArrayList<String>();
+    private final List<String> securityRoles = new ArrayList<>();
 
     /**
      * The servlet mappings for this web application, keyed by
      * matching pattern.
      */
-    private final Map<String, String> servletMappings = new HashMap<String, String>();
+    private final Map<String, String> servletMappings = new HashMap<>();
 
     /**
      * The session timeout (in minutes) for this web application.
@@ -475,7 +488,7 @@
      * HTTP status code (as an Integer).
      */
     private final Map<Integer, ErrorPage> statusPages =
-        new HashMap<Integer, ErrorPage>();
+        new HashMap<>();
 
     /**
      * Amount of ms that the container will wait for servlets to unload.
@@ -485,7 +498,7 @@
     /**
      * The watched resources for this application.
      */
-    private List<String> watchedResources =
+    private final List<String> watchedResources =
             Collections.synchronizedList(new ArrayList<String>());
 
     /**
@@ -497,13 +510,13 @@
      * The list of classnames of LifecycleListeners that will be added
      * to each newly created Wrapper by <code>createWrapper()</code>.
      */
-    private ArrayList<String> wrapperLifecycles = new ArrayList<String>();
+    private final ArrayList<String> wrapperLifecycles = new ArrayList<>();
 
     /**
      * The list of classnames of ContainerListeners that will be added
      * to each newly created Wrapper by <code>createWrapper()</code>.
      */
-    private List<String> wrapperListeners = new ArrayList<String>();
+    private final List<String> wrapperListeners = new ArrayList<>();
 
     /**
      * The pathname to the work directory for this context (relative to
@@ -689,10 +702,10 @@
     private boolean sessionCookieNameInitialized = false;
 
     protected ConcurrentMap<String, ServletRegistrationImpl> servletRegisMap =
-        new ConcurrentHashMap<String, ServletRegistrationImpl>();
+        new ConcurrentHashMap<>();
 
     protected ConcurrentMap<String, FilterRegistrationImpl> filterRegisMap =
-        new ConcurrentHashMap<String, FilterRegistrationImpl>();
+        new ConcurrentHashMap<>();
 
     /**
      * The list of ordered libs, which is used as the value of the
@@ -964,8 +977,9 @@
     public void setCharsetMapper(CharsetMapper mapper) {
         CharsetMapper oldCharsetMapper = this.charsetMapper;
         this.charsetMapper = mapper;
-        if( mapper != null )
+        if( mapper != null ) {
             this.charsetMapperClass= mapper.getClass().getName();
+        }
         support.firePropertyChange("charsetMapper", oldCharsetMapper,
                                    this.charsetMapper);
     }
@@ -1271,7 +1285,7 @@
         alternateDocBase.setBasePath(getBasePath(docBase));
 
         if (alternateDocBases == null) {
-            alternateDocBases = new ArrayList<AlternateDocBase>();
+            alternateDocBases = new ArrayList<>();
         }
         alternateDocBases.add(alternateDocBase);
     }
@@ -1329,7 +1343,9 @@
     }
 
     public String getEngineName() {
-        if( engineName != null ) return engineName;
+        if( engineName != null ) {
+            return engineName;
+        }
         return domain;
     }
 
@@ -1370,9 +1386,10 @@
     public void setLoginConfig(LoginConfig config) {
 
         // Validate the incoming property value
-        if (config == null)
+        if (config == null) {
             throw new IllegalArgumentException
                     (rb.getString(LogFacade.LOGIN_CONFIG_REQUIRED_EXCEPTION));
+        }
         String loginPage = config.getLoginPage();
         if ((loginPage != null) && !loginPage.startsWith("/")) {
             if (isServlet22()) {
@@ -1491,9 +1508,10 @@
      */
     @Override
     public void setPublicId(String publicId) {
-        if (log.isLoggable(Level.FINEST))
+        if (log.isLoggable(Level.FINEST)) {
             log.log(Level.FINEST, "Setting deployment descriptor public ID to '" +
                     publicId + "'");
+        }
 
         String oldPublicId = this.publicId;
         this.publicId = publicId;
@@ -1810,8 +1828,9 @@
         }
 
         DirContext oldResources = this.webappResources;
-        if (oldResources == resources)
+        if (oldResources == resources) {
             return;
+        }
 
         if (resources instanceof BaseDirContext) {
             BaseDirContext baseDirContext = (BaseDirContext)resources;
@@ -1846,8 +1865,9 @@
         final DirContext oldResources = ContextsAdapterUtility.unwrap(
                 alternateDocBase.getWebappResources());
 
-        if (oldResources == resources)
+        if (oldResources == resources) {
             return;
+        }
 
         if (resources instanceof BaseDirContext) {
             ((BaseDirContext) resources).setCached(isCachingAllowed());
@@ -2294,8 +2314,9 @@
     public void addEnvironment(ContextEnvironment environment) {
 
         ContextEnvironment env = findEnvironment(environment.getName());
-        if ((env != null) && !env.getOverride())
+        if ((env != null) && !env.getOverride()) {
             return;
+        }
         namingResources.addEnvironment(environment);
 
         if (notifyContainerListeners) {
@@ -2325,9 +2346,10 @@
     @Override
     public void addErrorPage(ErrorPage errorPage) {
         // Validate the input parameters
-        if (errorPage == null)
+        if (errorPage == null) {
             throw new IllegalArgumentException
                     (rb.getString(LogFacade.ERROR_PAGE_REQUIRED_EXCEPTION));
+        }
         String location = errorPage.getLocation();
         if ((location != null) && !location.startsWith("/")) {
             if (isServlet22()) {
@@ -2504,7 +2526,7 @@
      * the given name.
      */
     public Collection<String> getServletNameFilterMappings(String filterName) {
-        HashSet<String> mappings = new HashSet<String>();
+        HashSet<String> mappings = new HashSet<>();
         synchronized (filterMaps) {
             for (FilterMap fm : filterMaps) {
                 if (filterName.equals(fm.getFilterName()) &&
@@ -2521,7 +2543,7 @@
      * name.
      */
     public Collection<String> getUrlPatternFilterMappings(String filterName) {
-        HashSet<String> mappings = new HashSet<String>();
+        HashSet<String> mappings = new HashSet<>();
         synchronized (filterMaps) {
             for (FilterMap fm : filterMaps) {
                 if (filterName.equals(fm.getFilterName()) &&
@@ -3349,7 +3371,7 @@
                         !name.equals(Constants.DEFAULT_SERVLET_NAME) &&
                         !name.equals(Constants.JSP_SERVLET_NAME)) {
                     if (conflicts == null) {
-                        conflicts = new HashSet<String>();
+                        conflicts = new HashSet<>();
                     }
                     conflicts.add(pattern);
                 }
@@ -3797,8 +3819,9 @@
             setReplaceWelcomeFiles(false);
         }
         String results[] = new String[welcomeFiles.length + 1];
-        for (int i = 0; i < welcomeFiles.length; i++)
+        for (int i = 0; i < welcomeFiles.length; i++) {
             results[i] = welcomeFiles[i];
+        }
         results[welcomeFiles.length] = name;
         welcomeFiles = results;
 
@@ -4241,10 +4264,11 @@
         synchronized (roleMappings) {
             realRole = roleMappings.get(role);
         }
-        if (realRole != null)
+        if (realRole != null) {
             return (realRole);
-        else
+        } else {
             return (role);
+        }
     }
 
     /**
@@ -4323,8 +4347,9 @@
             int results[] = new int[statusPages.size()];
             Iterator<Integer> elements = statusPages.keySet().iterator();
             int i = 0;
-            while (elements.hasNext())
+            while (elements.hasNext()) {
                 results[i++] = elements.next();
+            }
             return results;
         }
     }
@@ -4489,8 +4514,9 @@
     @Override
     public void removeChild(Container child) {
 
-        if (!(child instanceof Wrapper))
+        if (!(child instanceof Wrapper)) {
             throw new IllegalArgumentException(rb.getString(LogFacade.NO_WRAPPER_EXCEPTION));
+        }
 
         super.removeChild(child);
     }
@@ -4942,8 +4968,9 @@
      */
     public boolean filterStart() {
 
-        if (log.isLoggable(Level.FINE))
+        if (log.isLoggable(Level.FINE)) {
             log.log(Level.FINE, "Starting filters");
+        }
         // Instantiate and record a FilterConfig for each defined filter
         boolean ok = true;
         synchronized (filterConfigs) {
@@ -4976,8 +5003,9 @@
      */
     public boolean filterStop() {
 
-        if (log.isLoggable(Level.FINE))
+        if (log.isLoggable(Level.FINE)) {
             log.log(Level.FINE, "Stopping filters");
+        }
 
         // Release all Filter and FilterConfig instances
         synchronized (filterConfigs) {
@@ -5172,8 +5200,9 @@
 
         for (ApplicationParameter param : findApplicationParameters()) {
             if (param.getOverride()) {
-                if (mergedParams.get(param.getName()) == null)
+                if (mergedParams.get(param.getName()) == null) {
                     mergedParams.put(param.getName(), param.getValue());
+                }
             } else {
                 mergedParams.put(param.getName(), param.getValue());
             }
@@ -5194,7 +5223,7 @@
 
         boolean ok = true;
 
-        Hashtable<String, String> env = new Hashtable<String, String>();
+        Hashtable<String, String> env = new Hashtable<>();
         if(getParent() != null) {
             env.put(ProxyDirContext.HOST, getParent().getName());
         }
@@ -5229,7 +5258,7 @@
             return;
         }
 
-        Hashtable<String, String> env = new Hashtable<String, String>();
+        Hashtable<String, String> env = new Hashtable<>();
         if (getParent() != null) {
             env.put(ProxyDirContext.HOST, getParent().getName());
         }
@@ -5338,7 +5367,7 @@
     // END SJSAS 6377790
         // Collect "load on startup" servlets that need to be initialized
         Map<Integer, List<Wrapper>> map =
-            new TreeMap<Integer, List<Wrapper>>();
+            new TreeMap<>();
         for (Container aChildren : children) {
             Wrapper wrapper = (Wrapper)aChildren;
             int loadOnStartup = wrapper.getLoadOnStartup();
@@ -5348,7 +5377,7 @@
             Integer key = loadOnStartup;
             List<Wrapper> list = map.get(key);
             if(list == null) {
-                list = new ArrayList<Wrapper>();
+                list = new ArrayList<>();
                 map.put(key, list);
             }
             list.add(wrapper);
@@ -5438,10 +5467,11 @@
             }
             try {
                 if ((docBase != null) && (docBase.endsWith(".war")) &&
-                        (!(new File(docBase).isDirectory())))
+                        (!(new File(docBase).isDirectory()))) {
                     setResources(new WARDirContext());
-                else
+                } else {
                     setResources(new WebDirContext());
+                }
             } catch (IllegalArgumentException e) {
                 throw new LifecycleException(rb.getString(LogFacade.INIT_RESOURCES_EXCEPTION), e);
             }
@@ -5517,10 +5547,12 @@
             started = true;
 
             // Start our subordinate components, if any
-            if ((loader != null) && (loader instanceof Lifecycle))
+            if ((loader != null) && (loader instanceof Lifecycle)) {
                 ((Lifecycle) loader).start();
-            if ((logger != null) && (logger instanceof Lifecycle))
+            }
+            if ((logger != null) && (logger instanceof Lifecycle)) {
                 ((Lifecycle) logger).start();
+            }
 
             // Unbinding thread
             // START OF SJSAS 8.1 6174179
@@ -5530,10 +5562,12 @@
             // Binding thread
             oldCCL = bindThread();
 
-            if ((realm != null) && (realm instanceof Lifecycle))
+            if ((realm != null) && (realm instanceof Lifecycle)) {
                 ((Lifecycle) realm).start();
-            if ((resources != null) && (resources instanceof Lifecycle))
+            }
+            if ((resources != null) && (resources instanceof Lifecycle)) {
                 ((Lifecycle) resources).start();
+            }
 
             // Start our child containers, if any
             for (Container child : findChildren()) {
@@ -5544,8 +5578,9 @@
 
             // Start the Valves in our pipeline (including the basic),
             // if any
-            if (pipeline instanceof Lifecycle)
+            if (pipeline instanceof Lifecycle) {
                 ((Lifecycle) pipeline).start();
+            }
 
             // START SJSAS 8.1 5049111
             // Notify our interested LifecycleListeners
@@ -5913,8 +5948,9 @@
         // Notify our interested LifecycleListeners
         lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null);
 
-        if (log.isLoggable(Level.FINE))
+        if (log.isLoggable(Level.FINE)) {
             log.log(Level.FINE, "Stopping complete");
+        }
 
         if(oname != null) {
             // Send j2ee.object.deleted notification
@@ -5957,7 +5993,7 @@
     private void resetContext() throws Exception, MBeanRegistrationException {
         // Restore the original state ( pre reading web.xml in start )
         // If you extend this - override this method and make sure to clean up
-        children=new HashMap<String, Container>();
+        children=new HashMap<>();
         startupTime = 0;
         startTimeMillis = 0;
         tldScanTime = 0;
@@ -6002,8 +6038,9 @@
     @Override
     public void backgroundProcess() {
 
-        if (!started)
+        if (!started) {
             return;
+        }
 
         count = (count + 1) % managerChecksFrequency;
 
@@ -6053,12 +6090,15 @@
      */
     protected String adjustURLPattern(String urlPattern) {
 
-        if (urlPattern == null)
+        if (urlPattern == null) {
             return (urlPattern);
-        if (urlPattern.startsWith("/") || urlPattern.startsWith("*."))
+        }
+        if (urlPattern.startsWith("/") || urlPattern.startsWith("*.")) {
             return (urlPattern);
-        if (!isServlet22())
+        }
+        if (!isServlet22()) {
             return (urlPattern);
+        }
         if (log.isLoggable(Level.FINE)) {
             log.log(Level.FINE, LogFacade.URL_PATTERN_WARNING, urlPattern);
         }
@@ -6129,8 +6169,9 @@
         String basePath = null;
         Container container = this;
         while (container != null) {
-            if (container instanceof Host)
+            if (container instanceof Host) {
                 break;
+            }
             container = container.getParent();
         }
         File file = new File(docBase);
@@ -6141,8 +6182,9 @@
                 // Use the "appBase" property of this container
                 String appBase = ((Host) container).getAppBase();
                 file = new File(appBase);
-                if (!file.isAbsolute())
+                if (!file.isAbsolute()) {
                     file = new File(engineBase(), appBase);
+                }
                 basePath = (new File(file, docBase)).getPath();
             }
         } else {
@@ -6262,7 +6304,7 @@
             if (parent == null) {
                 namingContextName = getName();
             } else {
-                Stack<String> stk = new Stack<String>();
+                Stack<String> stk = new Stack<>();
                 StringBuilder buff = new StringBuilder();
                 while (parent != null) {
                     stk.push(parent.getName());
@@ -6307,8 +6349,9 @@
         if (parentHost != null) {
             hostName = parentHost.getName();
         }
-        if ((hostName == null) || (hostName.length() < 1))
+        if ((hostName == null) || (hostName.length() < 1)) {
             hostName = "_";
+        }
         return hostName;
     }
 
@@ -6336,18 +6379,22 @@
                    engineName = parentEngine.getName();
                 }
             }
-            if ((hostName == null) || (hostName.length() < 1))
+            if ((hostName == null) || (hostName.length() < 1)) {
                 hostName = "_";
-            if ((engineName == null) || (engineName.length() < 1))
+            }
+            if ((engineName == null) || (engineName.length() < 1)) {
                 engineName = "_";
+            }
 
             String temp = getPath();
-            if (temp.startsWith("/"))
+            if (temp.startsWith("/")) {
                 temp = temp.substring(1);
+            }
             temp = temp.replace('/', '_');
             temp = temp.replace('\\', '_');
-            if (temp.length() < 1)
+            if (temp.length() < 1) {
                 temp = "_";
+            }
             if (hostWorkDir != null ) {
                 workDir = hostWorkDir + File.separator + temp;
             } else {
@@ -6408,15 +6455,17 @@
             if (urlPattern.indexOf('/') < 0) {
                 checkUnusualURLPattern(urlPattern);
                 return true;
-            } else
+            } else {
                 return false;
+            }
         }
         if ( (urlPattern.startsWith("/")) &&
                 (!urlPattern.contains("*."))) {
             checkUnusualURLPattern(urlPattern);
             return true;
-        } else
+        } else {
             return false;
+        }
 
     }
 
@@ -6446,7 +6495,7 @@
      */
     public String[] getEnvironments() {
         ContextEnvironment[] envs = getNamingResources().findEnvironments();
-        List<String> results = new ArrayList<String>();
+        List<String> results = new ArrayList<>();
         for(ContextEnvironment env : envs) {
             try {
                 ObjectName oname = createObjectName(env);
@@ -6470,7 +6519,7 @@
     public String[] getResourceNames() {
 
         ContextResource[] resources = getNamingResources().findResources();
-        List<String> results = new ArrayList<String>();
+        List<String> results = new ArrayList<>();
         for(ContextResource resource : resources) {
             try {
                 ObjectName oname = createObjectName(resource);
@@ -6493,7 +6542,7 @@
     public String[] getResourceLinks() {
 
         ContextResourceLink[] links = getNamingResources().findResourceLinks();
-        List<String> results = new ArrayList<String>();
+        List<String> results = new ArrayList<>();
         for(ContextResourceLink link : links) {
             try {
                 ObjectName oname = createObjectName(link);
@@ -6611,11 +6660,14 @@
                 getJ2EEServer();
 
         onameStr="j2eeType=WebModule,name=" + name + suffix;
-        if( log.isLoggable(Level.FINE))
+        if( log.isLoggable(Level.FINE)) {
             log.log(Level.FINE, "Registering " + onameStr + " for " + oname);
+        }
 
         // default case - no domain explictely set.
-        if( getDomain() == null ) domain=hst.getDomain();
+        if( getDomain() == null ) {
+            domain=hst.getDomain();
+        }
         return new ObjectName(getDomain() + ":" + onameStr);
     }
 
@@ -6733,7 +6785,9 @@
         }
         // XXX  The service and domain should be the same.
         String parentDomain=getEngineName();
-        if( parentDomain == null ) parentDomain=domain;
+        if( parentDomain == null ) {
+            parentDomain=domain;
+        }
         return new ObjectName( parentDomain + ":" +
                 "type=Host,host=" + hostName);
     }
@@ -6762,8 +6816,9 @@
                     ",resourcetype=Global,name=" + environment.getName());
         } else if (container instanceof Context) {
             String path = ((Context)container).getPath();
-            if (path.length() < 1)
+            if (path.length() < 1) {
                 path = "/";
+            }
             Host host = (Host) ((Context)container).getParent();
             name = new ObjectName(domain + ":type=Environment" +
                     ",resourcetype=Context,path=" + path +
@@ -6795,8 +6850,9 @@
                     ",name=" + encodedResourceName);
         } else if (container instanceof Context) {
             String path = ((Context)container).getPath();
-            if (path.length() < 1)
+            if (path.length() < 1) {
                 path = "/";
+            }
             Host host = (Host) ((Context)container).getParent();
             name = new ObjectName(domain + ":type=Resource" +
                     ",resourcetype=Context,path=" + path +
@@ -6830,8 +6886,9 @@
                     ",name=" + encodedResourceLinkName);
         } else if (container instanceof Context) {
             String path = ((Context)container).getPath();
-            if (path.length() < 1)
+            if (path.length() < 1) {
                 path = "/";
+            }
             Host host = (Host) ((Context)container).getParent();
             name = new ObjectName(domain + ":type=ResourceLink" +
                     ",resourcetype=Context,path=" + path +
@@ -6888,11 +6945,13 @@
             String mapuri = uri;
             while (true) {
                 child = (Context) host.findChild(mapuri);
-                if (child != null)
+                if (child != null) {
                     break;
+                }
                 int slash = mapuri.lastIndexOf('/');
-                if (slash < 0)
+                if (slash < 0) {
                     break;
+                }
                 mapuri = mapuri.substring(0, slash);
             }
         } catch (Throwable t) {
@@ -6972,14 +7031,17 @@
     @Override
     public String getMimeType(String file) {
 
-        if (file == null)
+        if (file == null) {
             return (null);
+        }
         int period = file.lastIndexOf(".");
-        if (period < 0)
+        if (period < 0) {
             return (null);
+        }
         String extension = file.substring(period + 1);
-        if (extension.length() < 1)
+        if (extension.length() < 1) {
             return (null);
+        }
         return (findMimeMapping(extension));
 
     }
@@ -6992,13 +7054,15 @@
     public RequestDispatcher getNamedDispatcher(String name) {
 
         // Validate the name argument
-        if (name == null)
+        if (name == null) {
             return (null);
+        }
 
         // Create and return a corresponding request dispatcher
         Wrapper wrapper = (Wrapper) findChild(name);
-        if (wrapper == null)
+        if (wrapper == null) {
             return (null);
+        }
 
         return new ApplicationDispatcher(wrapper, null, null, null, null, null, name);
 
@@ -7048,8 +7112,9 @@
             return null;
         }
 
-        if (!isFilesystemBased())
+        if (!isFilesystemBased()) {
             return null;
+        }
 
         if (path == null) {
             return null;
@@ -7113,8 +7178,9 @@
     public void log(Exception exception, String message) {
         message= neutralizeForLog(message);
         org.apache.catalina.Logger logger = getLogger();
-        if (logger != null)
+        if (logger != null) {
             logger.log(exception, logName() + message);
+        }
     }
 
     /**
@@ -7124,8 +7190,9 @@
     public void log(String message, Throwable throwable) {
         message= neutralizeForLog(message);
         org.apache.catalina.Logger logger = getLogger();
-        if (logger != null)
+        if (logger != null) {
             logger.log(logName() + message, throwable);
+        }
     }
 
     /**
@@ -7137,12 +7204,14 @@
     @Override
     public InputStream getResourceAsStream(String path) {
 
-        if (path == null || !path.startsWith("/"))
+        if (path == null || !path.startsWith("/")) {
             return (null);
+        }
 
         path = RequestUtil.normalize(path);
-        if (path == null)
+        if (path == null) {
             return (null);
+        }
 
         DirContext resources = null;
 
@@ -7163,8 +7232,9 @@
         if (resources != null) {
             try {
                 Object resource = resources.lookup(path);
-                if (resource instanceof Resource)
+                if (resource instanceof Resource) {
                     return (((Resource) resource).streamContent());
+                }
             } catch (Exception e) {
                 // do nothing
             }
@@ -7187,8 +7257,9 @@
         }
 
         path = RequestUtil.normalize(path);
-        if (path == null)
+        if (path == null) {
             return (null);
+        }
 
         String libPath = "/WEB-INF/lib/";
         if ((path.startsWith(libPath)) && (path.endsWith(".jar"))) {
@@ -7260,8 +7331,9 @@
         }
 
         path = RequestUtil.normalize(path);
-        if (path == null)
+        if (path == null) {
             return (null);
+        }
 
         DirContext resources = null;
 
@@ -7294,7 +7366,7 @@
      */
     private Set<String> getResourcePathsInternal(DirContext resources,
                                                  String path) {
-        HashSet<String> set = new HashSet<String>();
+        HashSet<String> set = new HashSet<>();
         try {
             listCollectionPaths(set, resources, path);
         } catch (NamingException e) {
@@ -7352,8 +7424,9 @@
         }
 
         path = RequestUtil.normalize(path);
-        if (path == null)
+        if (path == null) {
             return (null);
+        }
 
         pos = path.length();
 
@@ -7656,7 +7729,7 @@
         /*
          * The ServletContextListener to which to delegate
          */
-        private ServletContextListener delegate;
+        private final ServletContextListener delegate;
 
         /**
          * Constructor
@@ -7817,8 +7890,9 @@
             Binding binding = childPaths.nextElement();
             String name = binding.getName();
             StringBuilder childPath = new StringBuilder(path);
-            if (!"/".equals(path) && !path.endsWith("/"))
+            if (!"/".equals(path) && !path.endsWith("/")) {
                 childPath.append("/");
+            }
             childPath.append(name);
             Object object = binding.getObject();
             if (object instanceof DirContext &&
@@ -7833,10 +7907,11 @@
      * Get full path, based on the host name and the context path.
      */
     private static String getJNDIUri(String hostName, String path) {
-        if (!path.startsWith("/"))
+        if (!path.startsWith("/")) {
             return "/" + hostName + "/" + path;
-        else
+        } else {
             return "/" + hostName + path;
+        }
     }
 
     /**
diff --git a/nucleus/grizzly/config/src/main/java/org/glassfish/grizzly/config/ssl/JSSESupport.java b/nucleus/grizzly/config/src/main/java/org/glassfish/grizzly/config/ssl/JSSESupport.java
index 88142a2..31ccd6d 100644
--- a/nucleus/grizzly/config/src/main/java/org/glassfish/grizzly/config/ssl/JSSESupport.java
+++ b/nucleus/grizzly/config/src/main/java/org/glassfish/grizzly/config/ssl/JSSESupport.java
@@ -95,8 +95,8 @@
 
 
     @Override
-    public Object[] getPeerCertificateChain() throws IOException {
-        return getPeerCertificateChain(false);
+    public Certificate[] getPeerCertificates() throws IOException {
+        return getPeerCertificates(false);
     }
 
 
@@ -136,7 +136,7 @@
 
 
     @Override
-    public Object[] getPeerCertificateChain(boolean force) throws IOException {
+    public Certificate[] getPeerCertificates(boolean force) throws IOException {
         if (session == null) {
             return null;
         }
diff --git a/nucleus/parent/pom.xml b/nucleus/parent/pom.xml
index 49b6d32..fd9ec0b 100644
--- a/nucleus/parent/pom.xml
+++ b/nucleus/parent/pom.xml
@@ -84,14 +84,14 @@
         <hibernate-validator.version>7.0.3-SNAPSHOT</hibernate-validator.version>
 
         <!-- Jakarta Web Services -->
-        <!-- 
-        Jakarta XML Web Services 
+        <!--
+        Jakarta XML Web Services
         <jakarta.xml.ws-api.version>4.0.0-RC2</jakarta.xml.ws-api.version>
-        
-        Jakarta SOAP (with Attachments) 
+
+        Jakarta SOAP (with Attachments)
         <jakarta.xml.soap-api.version>3.0.0-RC2</jakarta.xml.soap-api.version>
          -->
-        <webservices.version>4.0.0-M3</webservices.version>
+        <webservices.version>4.0.0-SNAPSHOT</webservices.version>
 
         <!-- Jakarta Inject -->
         <jakarta.inject-api.version>2.0.1.MR</jakarta.inject-api.version>
@@ -120,9 +120,9 @@
 
 
         <!-- GlassFish Components -->
-        
+
         <glassfish-corba.version>4.2.4</glassfish-corba.version>
-        <grizzly.version>3.0.1</grizzly.version>
+        <grizzly.version>4.0.0-SNAPSHOT</grizzly.version>
         <grizzly.npn.version>2.0.0</grizzly.npn.version>
         <glassfish-management-api.version>3.2.3</glassfish-management-api.version>
         <pfl.version>4.1.2</pfl.version>
@@ -135,7 +135,7 @@
 
 
         <!-- 3rd party dependencies -->
-        
+
         <jboss.logging.annotation.version>2.2.1.Final</jboss.logging.annotation.version>
         <jboss.logging.version>3.4.3.Final</jboss.logging.version>
         <javassist.version>3.28.0-GA</javassist.version>
@@ -157,13 +157,13 @@
         <junit.version>5.8.2</junit.version>
         <jmh.version>1.34</jmh.version>
         <osgi-resource-locator.version>1.0.3</osgi-resource-locator.version>
-        
+
         <javaee.version.old>8</javaee.version.old>
         <javaee.version.new>9</javaee.version.new>
-        
-        
+
+
         <!-- Settings -->
-        
+
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.build.commonResourcesDirectory>${project.build.directory}/common-resources</project.build.commonResourcesDirectory>
         <legal.doc.source>${project.build.commonResourcesDirectory}/legal</legal.doc.source>
@@ -210,14 +210,14 @@
                 <artifactId>expressly</artifactId>
                 <version>${expressly.version}</version>
             </dependency>
-            
+
             <!-- Jakarta Servlet -->
             <dependency>
                 <groupId>jakarta.servlet</groupId>
                 <artifactId>jakarta.servlet-api</artifactId>
                 <version>${jakarta.servlet-api.version}</version>
             </dependency>
-            
+
             <!-- Jakarta Validation -->
             <dependency>
                 <groupId>jakarta.validation</groupId>
@@ -234,14 +234,14 @@
                 <artifactId>hibernate-validator-cdi</artifactId>
                 <version>${hibernate-validator.version}</version>
             </dependency>
-            
+
             <!-- Jakarta Web Services -->
             <dependency>
                 <groupId>org.glassfish.metro</groupId>
                 <artifactId>webservices-extra-jdk-packages</artifactId>
                 <version>${webservices.version}</version>
             </dependency>
-            
+
             <!-- Jakarta Inject -->
             <dependency>
                 <groupId>jakarta.inject</groupId>
@@ -260,7 +260,7 @@
                 <artifactId>osgi-resource-locator</artifactId>
                 <version>${osgi-resource-locator.version}</version>
             </dependency>
-            
+
             <!-- Jakarta XML Binding -->
             <dependency>
                 <groupId>jakarta.xml.bind</groupId>
@@ -278,7 +278,7 @@
                 <artifactId>jaxb-osgi</artifactId>
                 <version>${jakarta.jaxb-impl.version}</version>
             </dependency>
-            
+
             <!-- Jakarta REST -->
             <dependency>
                 <groupId>jakarta.ws.rs</groupId>
@@ -292,7 +292,7 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-            
+
             <!-- Jakarta Mail -->
             <dependency>
                 <groupId>jakarta.mail</groupId>
@@ -304,7 +304,7 @@
                 <artifactId>angus-mail</artifactId>
                 <version>${angus.mail.version}</version>
             </dependency>
-            
+
             <!-- Jakarta Activation -->
             <dependency>
                 <groupId>jakarta.activation</groupId>
@@ -316,17 +316,17 @@
                 <artifactId>angus-activation</artifactId>
                 <version>${angus.activation.version}</version>
             </dependency>
-            
+
             <!-- Jakarta Annotation -->
             <dependency>
                 <groupId>jakarta.annotation</groupId>
                 <artifactId>jakarta.annotation-api</artifactId>
                 <version>${jakarta.annotation-api.version}</version>
             </dependency>
-            
-            
+
+
             <!-- GlassFish Components -->
-            
+
             <!-- GlassFish Corba -->
             <dependency>
                 <groupId>org.glassfish.corba</groupId>
@@ -353,7 +353,7 @@
                 <artifactId>rmic</artifactId>
                 <version>${glassfish-corba.version}</version>
             </dependency>
-            
+
             <!-- GlassFish Grizzly -->
             <dependency>
                 <groupId>org.glassfish.grizzly</groupId>
@@ -362,14 +362,14 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-            
+
             <!-- GlassFish Management API -->
             <dependency>
                 <groupId>org.glassfish.external</groupId>
                 <artifactId>management-api</artifactId>
                 <version>${glassfish-management-api.version}</version>
             </dependency>
-            
+
             <!-- GlassFish Primitive Function Library -->
             <dependency>
                 <groupId>org.glassfish.pfl</groupId>
@@ -396,14 +396,14 @@
                 <artifactId>pfl-tf-tools</artifactId>
                 <version>${pfl.version}</version>
             </dependency>
-            
+
             <!-- Glassfish MBean Annotation Library -->
             <dependency>
                 <groupId>org.glassfish.gmbal</groupId>
                 <artifactId>gmbal</artifactId>
                 <version>${gmbal.version}</version>
             </dependency>
-            
+
             <!-- GlassFish Shoal -->
             <dependency>
                 <groupId>org.glassfish.shoal</groupId>
@@ -420,18 +420,18 @@
                 <artifactId>shoal-cache</artifactId>
                 <version>${shoal.version}</version>
             </dependency>
-            
+
             <!-- GlassFish High Availability -->
             <dependency>
                 <groupId>org.glassfish.ha</groupId>
                 <artifactId>ha-api</artifactId>
                 <version>${ha-api.version}</version>
             </dependency>
-            
-            
-            
+
+
+
             <!-- OSGi / Felix -->
-            
+
             <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>osgi.cmpn</artifactId>
@@ -529,11 +529,11 @@
                 <artifactId>jline</artifactId>
                 <version>2.14.5</version>
             </dependency>
-            
-            
-            
+
+
+
             <!--3rd party dependencies -->
-           
+
             <dependency>
                 <groupId>org.jboss.logging</groupId>
                 <artifactId>jboss-logging</artifactId>
@@ -574,7 +574,7 @@
                 <artifactId>asm-util</artifactId>
                 <version>${asm.version}</version>
             </dependency>
-            
+
             <dependency>
                 <groupId>javax.xml.stream</groupId>
                 <artifactId>stax-api</artifactId>
@@ -586,7 +586,7 @@
                 <artifactId>jettison</artifactId>
                 <version>${jettison.version}</version>
             </dependency>
-            
+
             <!-- Jackson - "the Java JSON library" -->
             <dependency>
                 <groupId>com.fasterxml</groupId>
@@ -619,7 +619,7 @@
                     </exclusion>
                 </exclusions>
             </dependency>
-            
+
             <dependency>
                 <groupId>antlr</groupId>
                 <artifactId>antlr</artifactId>
@@ -704,7 +704,7 @@
                 <artifactId>logging-annotation-processor</artifactId>
                 <version>${logging-annotation-processor.version}</version>
             </dependency>
-            
+
         </dependencies>
     </dependencyManagement>
 
diff --git a/nucleus/security/core/src/main/java/com/sun/enterprise/security/ssl/GlassfishSSLSupport.java b/nucleus/security/core/src/main/java/com/sun/enterprise/security/ssl/GlassfishSSLSupport.java
index 16d5581..2e0e866 100644
--- a/nucleus/security/core/src/main/java/com/sun/enterprise/security/ssl/GlassfishSSLSupport.java
+++ b/nucleus/security/core/src/main/java/com/sun/enterprise/security/ssl/GlassfishSSLSupport.java
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2021 Contributors to the Eclipse Foundation
+ * Copyright (c) 2021-2022 Contributors to the Eclipse Foundation
+ * Copyright (c) 2010-2021 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v. 2.0, which is available at
@@ -77,12 +77,12 @@
     }
 
     @Override
-    public Object[] getPeerCertificateChain() throws IOException {
-        return getPeerCertificateChain(false);
+    public Certificate[] getPeerCertificates() throws IOException {
+        return getPeerCertificates(false);
     }
 
     @Override
-    public Object[] getPeerCertificateChain(boolean force) throws IOException {
+    public Certificate[] getPeerCertificates(boolean force) throws IOException {
         if (session == null) {
             return null;
         }
@@ -152,7 +152,7 @@
         socket.startHandshake();
     }
 
-    private Object[] getX509Certs() {
+    private Certificate[] getX509Certs() {
         Certificate[] certs = null;
         try {
             certs = session.getPeerCertificates();
diff --git a/snapshots/grizzly/pom.xml b/snapshots/grizzly/pom.xml
new file mode 100644
index 0000000..4d5bfb3
--- /dev/null
+++ b/snapshots/grizzly/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (c) 2021 Contributors to the Eclipse Foundation. All rights reserved.
+
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v. 2.0, which is available at
+    http://www.eclipse.org/legal/epl-2.0.
+
+    This Source Code may also be made available under the following Secondary
+    Licenses when the conditions for such availability set forth in the
+    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+    version 2 with the GNU Classpath Exception, which is available at
+    https://www.gnu.org/software/classpath/license.html.
+
+    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
+>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.glassfish.main.snapshots</groupId>
+        <artifactId>snapshotsmodule</artifactId>
+        <version>0.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>grizzly</artifactId>
+    <packaging>pom</packaging>
+
+    <properties>
+        <snapshots.sources.url>https://github.com/eclipse-ee4j/grizzly/archive/refs/heads/master.zip</snapshots.sources.url>
+        <snapshots.sources.directory>${project.build.directory}/grizzly-master</snapshots.sources.directory>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.googlecode.maven-download-plugin</groupId>
+                <artifactId>download-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-invoker-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/snapshots/metro/pom.xml b/snapshots/metro/pom.xml
new file mode 100644
index 0000000..4f332a9
--- /dev/null
+++ b/snapshots/metro/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (c) 2021 Contributors to the Eclipse Foundation. All rights reserved.
+
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v. 2.0, which is available at
+    http://www.eclipse.org/legal/epl-2.0.
+
+    This Source Code may also be made available under the following Secondary
+    Licenses when the conditions for such availability set forth in the
+    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+    version 2 with the GNU Classpath Exception, which is available at
+    https://www.gnu.org/software/classpath/license.html.
+
+    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
+>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.glassfish.main.snapshots</groupId>
+        <artifactId>snapshotsmodule</artifactId>
+        <version>0.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>metro</artifactId>
+    <packaging>pom</packaging>
+
+    <properties>
+        <snapshots.sources.url>https://github.com/eclipse-ee4j/metro-wsit/archive/refs/heads/master.zip</snapshots.sources.url>
+        <snapshots.sources.directory>${project.build.directory}/metro-wsit-master/wsit</snapshots.sources.directory>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.googlecode.maven-download-plugin</groupId>
+                <artifactId>download-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-invoker-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/snapshots/pom.xml b/snapshots/pom.xml
index acf218d..195bce9 100644
--- a/snapshots/pom.xml
+++ b/snapshots/pom.xml
@@ -41,6 +41,8 @@
 
     <modules>
         <module>hibernate-validator</module>
+        <module>grizzly</module>
+        <module>metro</module>
     </modules>
 
     <build>