Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-586

NullPointerException is rootPOM field left empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Linux
    • Similar Issues:

      Description

      The web interface says that rootPOM can be left empty, but if you do that you
      get this:

      java.lang.NullPointerException
      hudson.maven.MavenModuleSet.submit(MavenModuleSet.java:374)
      hudson.model.Job.doConfigSubmit(Job.java:511)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:95)
      org.kohsuke.stapler.Function.bindAndinvoke(Function.java:51)
      org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:63)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:270)
      org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:240)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:270)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:207)
      org.kohsuke.stapler.Stapler.service(Stapler.java:72)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      It seems that the empty string is converted to null and then the equals method
      called on it:

      rootPOM = Util.fixEmpty(req.getParameter("rootPOM").trim());
      if(rootPOM.equals("pom.xml")) rootPOM=null; // normalization

        Attachments

          Activity

          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          D'oh!

          Fixed in 1.110

          Show
          kohsuke Kohsuke Kawaguchi added a comment - D'oh! Fixed in 1.110

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tal tal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: