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

NPE in java.util.regex.Matcher when getActionUrl returns null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • plugin-proposals
    • None
    • Platform: All, OS: All

      My plugin component implementing hudson.model.Action returns null in the hope of
      not being displayed in the menu. This results in a NPE. I'm pasting the first
      lines of the exception and if I can find an upload box I'll give the full
      stacktrace.

      java.lang.NullPointerException
      at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
      at java.util.regex.Matcher.reset(Matcher.java:291)
      at java.util.regex.Matcher.<init>(Matcher.java:211)
      at java.util.regex.Pattern.matcher(Pattern.java:888)
      at hudson.Functions.getActionUrl(Functions.java:870)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)

            Unassigned Unassigned
            toomasr toomasr
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: