groovy

Please use parser.getASTFactory().setASTNodeClass(GroovySourceAST.class)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Please use
parser.getASTFactory().setASTNodeClass(GroovySourceAST.class);
instead of
parser.setASTNodeClass("org.codehaus.groovy.antlr.GroovySourceAST");
in the JavaRecognizer and GroovyRecognizer because else it breakes the classloader in some cases.

Thanks
Richard Musiol

PS: The help icon right to this description box in "Create Issue" doesn't work.

Activity

Hide
Andres Almiray added a comment -

Could you provide a testcase showing why it won't work? thanks.

Show
Andres Almiray added a comment - Could you provide a testcase showing why it won't work? thanks.
Hide
Richard Musiol added a comment -

It is quite a long time ago that I posted this bug, but as far as I remember the problem occurred because I used GROOVY inside an Eclipse plugin. The heavily manipulated classloader of Eclipse's plugin system could not find the class in some cases when the name was provided as a String. (Nevertheless it is also bad coding style to specify a class this way.)

Show
Richard Musiol added a comment - It is quite a long time ago that I posted this bug, but as far as I remember the problem occurred because I used GROOVY inside an Eclipse plugin. The heavily manipulated classloader of Eclipse's plugin system could not find the class in some cases when the name was provided as a String. (Nevertheless it is also bad coding style to specify a class this way.)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: