MyFaces Core
  1. MyFaces Core
  2. MYFACES-968

LifecycleImpl's restoreView throws NPE when viewId is null in a portlet context

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.9m9, 1.1.0, 1.1.1
    • Fix Version/s: 1.1.5
    • Component/s: General
    • Labels:
      None

      Description

      LifecycleImpl's restoreView throws exception when viewId is null and in a portlet context

      In restoreView:
      if(viewId == null)
      {
      ExternalContext externalContext = facesContext.getExternalContext();
      if(!externalContext.getRequestServletPath().endsWith("/"))

      In a portlet context getRequestServletPath() returns null by definition. Not only should we avoid the NPE, but we should do something appropriate for portlets (return to the 'default-view')

      1. 968.patch
        0.7 kB
        Nikolay Petrov

        Activity

          People

          • Assignee:
            Martin Marinschek
            Reporter:
            Dave Brondsema
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development