Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-968

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.9m9, 1.1.0, 1.1.1
    • 1.1.5
    • General
    • 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')

      Attachments

        1. 968.patch
          0.7 kB
          Nikolay Petrov

        Activity

          People

            mmarinschek Martin Marinschek
            brondsem David Philip Brondsema
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: