Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1506

ClassCastException during surefire tests when calling ExternalContextUtils.getServletContextPath()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.11-core
    • 1.2.12-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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mattcooper Matt Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: