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

Avoid NullPointerException when using the SearchContainer taglib

    Details

      Description

      Steps to reproduce

      1. Execute following groovy script:
        try {
        	def rowChecker = new com.liferay.portal.kernel.dao.search.RowChecker(actionResponse);
        	out.println(rowChecker);
        	rowChecker.getAllRowsCheckBox();
        }
        catch (Exception e) {
        	e.printStackTrace(out);
        }
        
      • Expected behavior: No NPE exception is thrown
      • Wrong behavior: NPE exception is thrown
        com.liferay.portal.kernel.dao.search.RowChecker@63f6f22
        java.lang.NullPointerException
        	at com.liferay.portal.kernel.dao.search.RowChecker.getAllRowsCheckbox(RowChecker.java:168)
        	at com.liferay.portal.kernel.dao.search.RowChecker.getAllRowsCheckBox(RowChecker.java:67)
        	at com.liferay.portal.kernel.dao.search.RowChecker.getAllRowsCheckBox(RowChecker.java:63)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M4