Description
Since the JSFViewDeclarationLanguageStrategy.java always returns true now : https://issues.apache.org/jira/browse/MYFACES-4183
A issue is now found in the JSPViewDeclarationLanguage.getViews:
@Override public Stream<String> getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) { Stream<String> stream = super.getViews(facesContext, path, maxDepth, options); stream = stream.filter(f -> _strategy.handles(f)); if (options != null && Arrays.binarySearch(options, ViewVisitOption.RETURN_AS_MINIMAL_IMPLICIT_OUTCOME) >= 0) { stream = stream.map(f -> _strategy.getMinimalImplicitOutcome(f)); } return stream; }
As you can see from the code above it would be possible to now return views here that are not actually handled specifically by the JSP vdl. For instance in the FaceletViewDeclarationLanguage we have the following filter in place:
stream = stream.filter(f -> (_strategy.handles(f) && !FaceletsTemplateMappingUtils.matchTemplate(runtimeConfig, f) ) );
This filter allows us to specify something like the following in the faces-config.xml and avoid returning a view from getViews(), however now it would be returned incorrectly by the JSP vdl:
<faces-config-extension> <facelets-template-mapping> <url-pattern>/templates/*</url-pattern> </facelets-template-mapping> </faces-config-extension>