Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6608

GroovyLexer#require(...) method execution may have a NULL parser

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.3
    • Component/s: ast builder
    • Labels:
      None

      Description

      The issue if found in Groovy Eclipse.

      Test Scenario:
      def scanFolders(){
      doThis(
      ~"(?i)^sometext$", // SMART TAB FAILS AFTER HERE.
      // ESCAPE THE DOLLAR SIGN AND THE WORLD SPINS AGAIN
      ~"(?i)^vti", // Sub-folder exclusion Filter
      null,
      null
      );
      };

      Press enter at the end of the line and observe NPE in the log. NPE occurs in the method due to the null parser field.

      The body of GroovyLexer#require(...) has a reference to parser that may not be set all the time. Furthermore the TODO comment in the method body states that error reporting should be done without parser usage: "Direct to a common error handler, rather than through the parser".

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              aboyko Alex Boyko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: