Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.2.11-core
-
None
-
None
Description
If you have a renderer that makes a call like this:
ExternalContextUtils.getServletContextPath(context.getExternalContext());
Then, when running a surefire test for a component that uses such a renderer, a ClassCastException will be thrown where some underlying code is expecting a javax.servlet.ServletContext however, a org.apache.myfaces.trinidadinternal.renderkit.MApplication is provided instead. Perhaps MApplication needs to implement/extend ServletContext or otherwise ExternalContextUtils.getServletContextPath() needs to return a dummy value when running surefire tests.