Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16242

Fix NPE when script return no output

    XMLWordPrintable

    Details

    • Tags:
    • Sprint:
      DevOps Sprint 9

      Description

      In org.nuxeo.shell.automation.cmds.Script.run(), when a script (Groovy or MVEL) returns no output, the following NPE is raised:

      org.nuxeo.shell.ShellException: Failed to run script
          at org.nuxeo.shell.automation.cmds.Script.run(Script.java:74)
          at org.nuxeo.shell.Shell.run(Shell.java:495)
          at org.nuxeo.shell.Shell.run(Shell.java:490)
          at org.nuxeo.shell.Shell.run(Shell.java:484)
          at org.nuxeo.shell.cmds.Interactive.run(Interactive.java:118)
          at org.nuxeo.shell.Shell.run(Shell.java:495)
          at org.nuxeo.shell.Shell.run(Shell.java:490)
          at org.nuxeo.shell.Shell.run(Shell.java:484)
          at org.nuxeo.shell.Shell.main(Shell.java:273)
          at org.nuxeo.shell.Main.main(Main.java:25)
      Caused by: java.lang.NullPointerException
          at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
          at java.util.regex.Matcher.reset(Matcher.java:308)
          at java.util.regex.Matcher.<init>(Matcher.java:228)
          at java.util.regex.Pattern.matcher(Pattern.java:1088)
          at org.nuxeo.shell.utils.ANSICodes.appendTemplate(ANSICodes.java:134)
          at org.nuxeo.shell.automation.cmds.Script.run(Script.java:71)
          ... 9 more
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.