Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3142

NullPointerException with Java8 in AbstractUsingBundleList

    XMLWordPrintableJSON

    Details

      Description

      When using the launchpad plugin with java 8 I get an NPE with:
      Caused by: java.lang.NullPointerException
      at java.util.Objects.requireNonNull(Objects.java:203)
      at java.util.ArrayList.removeAll(ArrayList.java:674)
      at org.apache.maven.shared.filtering.DefaultMavenFileFilter.getDefaultFilterWrappers(DefaultMavenFileFilter.java:215)
      at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile(DefaultMavenFileFilter.java:75)
      at org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.readSlingProperties(AbstractUsingBundleListMojo.java:411)
      at org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.getSlingProperties(AbstractUsingBundleListMojo.java:460)

      It seems that while ArrayList#removeAll(null) does not throw with pre Java8 it now does - the javadocs clearly state that a NPE is thrown, so we should adjust our code

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              cziegeler Carsten Ziegeler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: