• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • violations-plugin
    • None
    • Master - Ubuntu 10.04 x64, Slave - Windows Server 2008 x86

      When parsing Gendarme violations I ran into this error:

      ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception
      java.lang.NullPointerException
      at hudson.plugins.violations.types.gendarme.GendarmeParser.parseViolations(GendarmeParser.java:180)
      at hudson.plugins.violations.types.gendarme.GendarmeParser.parse(GendarmeParser.java:73)
      at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
      at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
      at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1899)
      at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:270)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      After looking at the code I'm unsure as to how it could happen since there doesn't seem any way for fileName or filePath to become null, I'm quite happy to investigate further with a bit of guidance.

      Is there anyway I can directly test parsing one of the XML files, without running it via Hudson? I can't really post them here as it's for all internal code unfortunately.

          [JENKINS-7977] NPE in GendarmeParser

          damoxc added a comment -

          A tentative patch fixing this issue, root cause was that File was using the wrong separator to split the path, so added a simple class that does this depending on the path it is passed, to make it platform independent.

          There may be a better way to do this which I'm happy to undertake given guidance.

          damoxc added a comment - A tentative patch fixing this issue, root cause was that File was using the wrong separator to split the path, so added a simple class that does this depending on the path it is passed, to make it platform independent. There may be a better way to do this which I'm happy to undertake given guidance.

          Mark Waite added a comment -

          The violations plugin is deprecated. It has an unresolved security vulnerability. The last commit to the source code repository was over 7 years ago. Closing the issue as "Won't fix"

          Mark Waite added a comment - The violations plugin is deprecated. It has an unresolved security vulnerability. The last commit to the source code repository was over 7 years ago. Closing the issue as "Won't fix"

            peterkittreilly peterkittreilly
            damoxc damoxc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: