Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-319

Filtering throws NPE when using JDK8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • maven-filtering-1.1
    • maven-filtering-1.2
    • maven-filtering
    • None

    Description

      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.getDefaultFi
      lterWrappers(DefaultMavenFileFilter.java:217)
              at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile(Def
      aultMavenFileFilter.java:76)
      

      This happens when the following situation occurs:

      // request.getFileFilters()  is null
      buildFilters.removeAll( request.getFileFilters() );
      

      Root cause: https://bugs.openjdk.java.net/browse/JDK-8015656
      So let's do the null check in the maven-filtering codebase.

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              rfscholte Robert Scholte
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: