Buggy code:
public class UndertowDeploymentInfoService implements Service < DeploymentInfo > { public static final ServiceName SERVICE_NAME = ServiceName . of ( "UndertowDeploymentInfoService" ) ; private DeploymentInfo deploymentInfo ; private final JBossWebMetaData mergedMetaData ; private final String deploymentName ; private final TldsMetaData tldsMetaData ; private final List < TldMetaData > sharedTlds ; private final Module module ; private final WebInjectionContainer injectionContainer ; private final ComponentRegistry componentRegistry ; private final ScisMetaData scisMetaData ; private final VirtualFile deploymentRoot ; private final String securityContextId ; private final String securityDomain ; private final List < ServletContextAttribute > attributes ; private final String contextPath ; private final List < SetupAction > setupActions ; private final Set < VirtualFile > overlays ; private final List < ExpressionFactoryWrapper > expressionFactoryWrappers ; private final InjectedValue < UndertowService > undertowService = new InjectedValue ( ) ; private final InjectedValue < SessionManagerFactory > sessionManagerFactory = new InjectedValue < SessionManagerFactory > ( ) ; private final InjectedValue < SecurityDomainContext > securityDomainContextValue = new InjectedValue < SecurityDomainContext > ( ) ; private final InjectedValue < ServletContainerService > container = new InjectedValue ( ) ; private final InjectedValue < DirectBufferCache > bufferCacheInjectedValue = new InjectedValue ( ) ; private final InjectedValue < SessionCookieConfigService > defaultSessionCookieConfig = new InjectedValue ( ) ; private UndertowDeploymentInfoService ( final JBossWebMetaData mergedMetaData , final String deploymentName , final TldsMetaData tldsMetaData , final List < TldMetaData > sharedTlds , final Module module , final WebInjectionContainer injectionContainer , final ComponentRegistry componentRegistry , final ScisMetaData scisMetaData , final VirtualFile deploymentRoot , final String securityContextId , final String securityDomain , final List < ServletContextAttribute > attributes , final String contextPath , final List < SetupAction > setupActions , final Set < VirtualFile > overlays , final List < ExpressionFactoryWrapper > expressionFactoryWrappers ) { } @ Override public synchronized void start ( final StartContext startContext ) throws StartException { ClassLoader oldTccl = Thread . currentThread ( ) . getContextClassLoader ( ) ; try { Thread . currentThread ( ) . setContextClassLoader ( module . getClassLoader ( ) ) ; DeploymentInfo deploymentInfo = createServletConfig ( ) ; handleDistributable ( deploymentInfo ) ; handleIdentityManager ( deploymentInfo ) ; SessionConfigMetaData sessionConfig = mergedMetaData . getSessionConfig ( ) ; SessionCookieConfig config = null ; SessionCookieConfigService defaultSessionConfig = defaultSessionCookieConfig . getOptionalValue ( ) ; if ( defaultSessionConfig != null ) { config = new SessionCookieConfigImpl ( ) ; if ( ( defaultSessionConfig . getName ( ) ) != null ) { config . setName ( defaultSessionConfig . getName ( ) ) ; } if ( ( defaultSessionConfig . getDomain ( ) ) != null ) { config . setDomain ( defaultSessionConfig . getDomain ( ) ) ; } if ( ( defaultSessionConfig . getHttpOnly ( ) ) != null ) { config . setHttpOnly ( defaultSessionConfig . getHttpOnly ( ) ) ; } if ( ( defaultSessionConfig . getSecure ( ) ) != null ) { config . setSecure ( defaultSessionConfig . getSecure ( ) ) ; } if ( ( defaultSessionConfig . getMaxAge ( ) ) != null ) { config . setMaxAge ( defaultSessionConfig . getMaxAge ( ) ) ; } if ( ( defaultSessionConfig . getComment ( ) ) != null ) { config . setComment ( defaultSessionConfig . getComment ( ) ) ; } } if ( sessionConfig != null ) { if ( sessionConfig . getSessionTimeoutSet ( ) ) { deploymentInfo . setDefaultSessionTimeout ( ( ( sessionConfig . getSessionTimeout ( ) ) * 60 ) ) ; } CookieConfigMetaData cookieConfig = sessionConfig . getCookieConfig ( ) ; if ( cookieConfig != null ) { if ( config == null ) { config = new SessionCookieConfigImpl ( ) ; } if ( ( cookieConfig . getName ( ) ) != null ) { config . setName ( cookieConfig . getName ( ) ) ; } if ( ( cookieConfig . getDomain ( ) ) != null ) { config . setDomain ( cookieConfig . getDomain ( ) ) ; } <START_BUG> if ( ( cookieConfig . getDomain ( ) ) != null ) { <END_BUG> config . setComment ( cookieConfig . getComment ( ) ) ; } config . setSecure ( cookieConfig . getSecure ( ) ) ; config . setPath ( cookieConfig . getPath ( ) ) ; config . setMaxAge ( cookieConfig . getMaxAge ( ) ) ; config . setHttpOnly ( cookieConfig . getHttpOnly ( ) ) ; } } if ( config != null ) { deploymentInfo . setSessionCookieConfig ( config ) ; } for ( final SetupAction action : setupActions ) { deploymentInfo . addThreadSetupAction ( new ThreadSetupAction ( ) { private final Handle handle = new Handle ( ) { @ Override public void tearDown ( ) { action . teardown ( Collections . < String , Object > emptyMap ( ) ) ; } } ; @ Override public Handle setup ( final HttpServerExchange exchange ) { action . setup ( Collections . < String , Object > emptyMap ( ) ) ; return handle ; } } ) ; } this . deploymentInfo = deploymentInfo ; } finally { Thread . currentThread ( ) . setContextClassLoader ( oldTccl ) ; } } @ Override public synchronized void stop ( final StopContext stopContext ) { } @ Override public synchronized DeploymentInfo getValue ( ) throws IllegalArgumentException , IllegalStateException { } private void handleIdentityManager ( final DeploymentInfo deploymentInfo ) { } private ConfidentialPortManager getConfidentialPortManager ( ) { } private void handleDistributable ( final DeploymentInfo deploymentInfo ) { } private DeploymentInfo createServletConfig ( ) throws StartException { } private static String authMethod ( String configuredMethod ) { } private static TransportGuaranteeType transportGuaranteeType ( final TransportGuaranteeType type ) { } private static HashMap < String , JspPropertyGroup > createJspConfig ( JBossWebMetaData metaData ) { } private static HashMap < String , TagLibraryInfo > createTldsInfo ( final TldsMetaData tldsMetaData , List < TldMetaData > sharedTlds ) throws ClassNotFoundException { }

Fix:
if ( ( cookieConfig . getComment ( ) ) != null ) {