[
https://issues.apache.org/jira/browse/MYFACES-3958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14339187#comment-14339187
]
Karl Kildén commented on MYFACES-3958:
--------------------------------------
if it is as obvious as it looks like then this line instead on line 397:
for (int i = 0, size = faceletsFiles.length; i < size; i++)
Would do it
> FacesConfigurator last modified from .taglib.xml causes
> IndexOutOfBoundsException
> ----------------------------------------------------------------------------------
>
> Key: MYFACES-3958
> URL: https://issues.apache.org/jira/browse/MYFACES-3958
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.2.7
> Environment: TomEE 1.7.1 with upgraded myfaces
> Reporter: Karl Kildén
>
> Hello,
> This has changed in 2.2.7 and it seems broken for me.
> Steps to reproduce:
> 1. Have no extra faces-config, just the std one in web-inf
> 2. Do have extra taglib.xml file!
> 3. It blows up on first request
> The flow is like this, in FacesConfigurator#getLastModifiedTime you get a
> list back that is empty if no extra faces-configs. Happens on line 378.
> Then a major bad thing happens. The comment on line 389 seems aware that the
> call call to #getStringInitParameter with key javax.faces.FACELETS_LIBRARIES
> is actually about taglibs. However the result from that call is treated like
> faces-configs.
> Since the list of faces-configs was empty since before it blows up on row
> 397.
> I don't understand the code here fully - but this is my conclusion thus far.
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> java.util.ArrayList.rangeCheck(ArrayList.java:653)
> java.util.ArrayList.get(ArrayList.java:429)
>
> org.apache.myfaces.config.FacesConfigurator.getLastModifiedTime(FacesConfigurator.java:397)
>
> org.apache.myfaces.config.FacesConfigurator.update(FacesConfigurator.java:469)
>
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:137)
>
> org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeLifecycleWrapper.execute(DeltaSpikeLifecycleWrapper.java:89)
> javax.faces.lifecycle.LifecycleWrapper.execute(LifecycleWrapper.java:46)
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>
> org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:111)
> org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
> org.apache.deltaspike.servlet.impl.event.EventBridgeFilter.doFilter(EventBridgeFilter.java:59)
>
> org.apache.deltaspike.servlet.impl.produce.RequestResponseHolderFilter.doFilter(RequestResponseHolderFilter.java:63)
>
> org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:122)
> org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108)
>
> org.apache.sirona.web.servlet.SironaFilter$Invocation.proceed(SironaFilter.java:140)
>
> org.apache.sirona.web.servlet.SironaFilter.proceed(SironaFilter.java:100)
> org.apache.sirona.web.servlet.SironaFilter.proceed(SironaFilter.java:36)
>
> org.apache.sirona.aop.AbstractPerformanceInterceptor.doInvoke(AbstractPerformanceInterceptor.java:84)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)