Improve one time only runtime check if MyFaces is in use
Issue: SWF-1705
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.faces.webflow;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.FacesContextWrapper;
|
||||
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
@@ -104,6 +105,9 @@ public class JsfRuntimeInformation {
|
||||
if (facesContext == null) {
|
||||
return false;
|
||||
}
|
||||
while (facesContext instanceof FacesContextWrapper) {
|
||||
facesContext = ((FacesContextWrapper) facesContext).getWrapped();
|
||||
}
|
||||
myFacesInUse = facesContext.getClass().getPackage().getName().startsWith("org.apache.myfaces.");
|
||||
}
|
||||
return myFacesInUse;
|
||||
|
||||
Reference in New Issue
Block a user