Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-451

NPE when file list is empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.1
    • 1.2
    • maven-scm-api
    • None
    • Patch

    Description

      When running the Changelog plugin on an actual changeset of a huge project, a NullPointerException is thrown as follows. This can be remedied by applying the attached fix to the code.

      java.lang.NullPointerException
      at org.apache.maven.scm.ChangeSet.toXML(ChangeSet.java:425)
      at org.apache.maven.scm.command.changelog.ChangeLogSet.toXML(ChangeLogSet.java:198)
      at org.apache.maven.plugin.changelog.ChangeLogReport.writeChangelogXml(ChangeLogReport.java:421)
      at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(ChangeLogReport.java:397)
      at org.apache.maven.plugin.changelog.ChangeLogReport.executeReport(ChangeLogReport.java:340)
      at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
      at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
      at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:129)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:618)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      Attachments

        1. maven-scm-api.patch
          0.5 kB
          tinne

        Activity

          People

            olamy Olivier Lamy
            tinne tinne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: