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

ClassifierFilter throws NullPointerException is artifact has no classifier

    XMLWordPrintableJSON

Details

    • Patch

    Description

      If artifact has no classifier attribute when ClassifierFilter throws NullPointerException rather than skip this artifact (because it's classifier doesn't equals required).

      Changes in TestClassifierFilter TestCase:

      org.apache.maven.shared.artifact.filter.collection.TestClassifierFilter.java
       
          protected void setUp() throws Exception
          {
              ....
      
              artifacts.add(new DefaultArtifact("g", "e", VersionRange.createFromVersion("1.0"), "compile", "jar", null,
                      new DefaultArtifactHandler("a")));
          }
      

      P.S. ArtifactStubFactory.getClassifiedArtifacts() should be changed to return artifact with null classifier.

      Attachments

        1. patch
          0.6 kB
          Sergey Klimenko

        Activity

          People

            pgier Paul Gier
            smklimenko Sergey Klimenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: