Buggy code:
@ Override public synchronized void start ( final StartContext startContext ) throws StartException { } @ Override public synchronized void stop ( final StopContext stopContext ) { } @ Override public synchronized DeploymentInfo getValue ( ) throws IllegalArgumentException , IllegalStateException { } private void handleJASPIMechanism ( final DeploymentInfo deploymentInfo ) { } private void handleIdentityManager ( final DeploymentInfo deploymentInfo ) { } private ConfidentialPortManager getConfidentialPortManager ( ) { } private void handleDistributable ( final DeploymentInfo deploymentInfo ) { } private String resolveContextPath ( ) { } private DeploymentInfo createServletConfig ( ) throws StartException { final ComponentRegistry componentRegistry = componentRegistryInjectedValue . getValue ( ) ; try { if ( ! ( mergedMetaData . isMetadataComplete ( ) ) ) { mergedMetaData . resolveAnnotations ( ) ; } final DeploymentInfo d = new DeploymentInfo ( ) ; d . setContextPath ( resolveContextPath ( ) ) ; if ( ( mergedMetaData . getDescriptionGroup ( ) ) != null ) { d . setDisplayName ( mergedMetaData . getDescriptionGroup ( ) . getDisplayName ( ) ) ; } d . setDeploymentName ( deploymentName ) ; final ServletContainerService servletContainer = container . getValue ( ) ; try { ResourceManager resourceManager = new ServletResourceManager ( deploymentRoot , overlays ) ; resourceManager = new io . undertow . server . handlers . resource . CachingResourceManager ( 100 , ( ( 10 * 1024 ) * 1024 ) , servletContainer . getBufferCache ( ) , resourceManager , ( explodedDeployment ? 2000 : - 1 ) ) ; d . setResourceManager ( resourceManager ) ; } catch ( IOException e ) { throw new StartException ( e ) ; } File tempFile = new File ( pathManagerInjector . getValue ( ) . getPathEntry ( UndertowDeploymentInfoService . TEMP_DIR ) . resolvePath ( ) , deploymentName ) ; tempFile . mkdirs ( ) ; d . setTempDir ( tempFile ) ; d . setClassLoader ( module . getClassLoader ( ) ) ; final String servletVersion = mergedMetaData . getServletVersion ( ) ; if ( servletVersion != null ) { d . setMajorVersion ( Integer . parseInt ( ( ( servletVersion . charAt ( 0 ) ) + "" ) ) ) ; d . setMinorVersion ( Integer . parseInt ( ( ( servletVersion . charAt ( 2 ) ) + "" ) ) ) ; } else { d . setMajorVersion ( 3 ) ; d . setMinorVersion ( 1 ) ; } d . setAllowNonStandardWrappers ( servletContainer . isAllowNonStandardWrappers ( ) ) ; d . setServletStackTraces ( servletContainer . getStackTraces ( ) ) ; if ( ( servletContainer . getSessionPersistenceManager ( ) ) != null ) { d . setSessionPersistenceManager ( servletContainer . getSessionPersistenceManager ( ) ) ; } boolean is22OrOlder ; if ( ( d . getMajorVersion ( ) ) == 1 ) { is22OrOlder = true ; } else if ( ( d . getMajorVersion ( ) ) == 2 ) { is22OrOlder = ( d . getMinorVersion ( ) ) < 3 ; } else { is22OrOlder = false ; } JSPConfig jspConfig = servletContainer . getJspConfig ( ) ; final Set < String > seenMappings = new HashSet < > ( ) ; HashMap < String , TagLibraryInfo > tldInfo = UndertowDeploymentInfoService . createTldsInfo ( tldsMetaData , sharedTlds ) ; d . setDefaultServletConfig ( new DefaultServletConfig ( true , Collections . < String > emptySet ( ) ) ) ; <START_BUG> final ServletInfo jspServlet = ( jspConfig != null ) ? jspConfig . getJSPServletInfo ( ) : null ; <END_BUG> if ( jspServlet != null ) { HashMap < String , JspPropertyGroup > propertyGroups = UndertowDeploymentInfoService . createJspConfig ( mergedMetaData ) ; JspServletBuilder . setupDeployment ( d , propertyGroups , tldInfo , new UndertowJSPInstanceManager ( new org . jboss . as . web . common . WebInjectionContainer ( module . getClassLoader ( ) , componentRegistryInjectedValue . getValue ( ) ) ) ) ; if ( ( mergedMetaData . getJspConfig ( ) ) != null ) { d . setJspConfigDescriptor ( new JspConfigDescriptorImpl ( tldInfo . values ( ) , propertyGroups . values ( ) ) ) ; } d . addServlet ( jspServlet ) ; final Set < String > jspPropertyGroupMappings = propertyGroups . keySet ( ) ; for ( final String mapping : jspPropertyGroupMappings ) { jspServlet . addMapping ( mapping ) ; } seenMappings . addAll ( jspPropertyGroupMappings ) ; if ( ! ( expressionFactoryWrappers . isEmpty ( ) ) ) { d . addListener ( new ListenerInfo ( JspInitializationListener . class ) ) ; d . addServletContextAttribute ( CONTEXT_KEY , expressionFactoryWrappers ) ; } } d . setClassIntrospecter ( new UndertowDeploymentInfoService . ComponentClassIntrospector ( componentRegistry ) ) ; final Map < String , List < ServletMappingMetaData > > servletMappings = new HashMap < > ( ) ; if ( ( mergedMetaData . getExecutorName ( ) ) != null ) { d . setExecutor ( executorsByName . get ( mergedMetaData . getExecutorName ( ) ) . getValue ( ) ) ; } if ( ( mergedMetaData . getServletMappings ( ) ) != null ) { for ( final ServletMappingMetaData mapping : mergedMetaData . getServletMappings ( ) ) { List < ServletMappingMetaData > list = servletMappings . get ( mapping . getServletName ( ) ) ; if ( list == null ) { servletMappings . put ( mapping . getServletName ( ) , ( list = new ArrayList ( ) ) ) ; } list . add ( mapping ) ; } } if ( ( mergedMetaData . getServlets ( ) ) != null ) { for ( final JBossServletMetaData servlet : mergedMetaData . getServlets ( ) ) { final ServletInfo s ; if ( ( servlet . getJspFile ( ) ) != null ) { s = new ServletInfo ( servlet . getName ( ) , JspServlet . class ) ;

Fix:
final ServletInfo jspServlet = ( jspConfig != null ) ? jspConfig . createJSPServletInfo ( ) : null ;