Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-46473

Cannot create web content due to Arrays.asList throwing an NPE

    Details

    • Story Points:
      2

      Description

      steps to reproduce

      1) start up portal
      2) go to content -> web content
      3) click on add -> basic web content

      actual behavior: a stacktrace appears in the console and one cannot publish the web content

      java.lang.NullPointerException
              at java.util.Arrays$ArrayList.<init>(Arrays.java:3357)
              at java.util.Arrays.asList(Arrays.java:3343)
              at org.apache.jsp.html.taglib.ui.input_005fpermissions.page_jsp._jspService(page_jsp.java:623)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:97)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
              at com.liferay.portal.kernel.servlet.PortalIncludeUtil.include(PortalIncludeUtil.java:48)
              at com.liferay.taglib.ui.InputPermissionsTag.doTag(InputPermissionsTag.java:81)
      

      this is caused by LPS-46445 where we deprecate the call to ListUtil.fromArray and replace it with Arrays.asList

      ListUtil was handling the case where the array passed in was null; Arrays.asList throws an NPE

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                haoliang.wu Haoliang Wu (Inactive)
                Reporter:
                andrew.betts Andrew Betts
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 28 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.0 M3