Menu

#285 Parse error when parsing valid Java code (2.0b4)

None
closed
nobody
Parsing (77)
5
2018-08-02
2007-02-12
Anonymous
No

Submitter e-mail: christian [dot] glodt [at] uni [dot] lu

The attached Java code fails to parse in Beanshell 2.0b4 even though it compiles and runs correctly when using Sun's Java.

The test() method in the example is adapted from computer-generated code, that's why there are some redundant parentheses.

Using Sun's Java, the result of the example is:
$ javac BshTest.java
Note: BshTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
$ java BshTest
BshTest$SomeClass@130c19b

With Beanshell, the result is:

$ bsh BshTest.java
Evaluation Error: Parse error at line 16, column 45. Encountered: (

Discussion

  • Nobody/Anonymous

    Test case illustrating the parsing problem

     
  • nickl-

    nickl- - 2018-08-02
    • status: open --> closed
    • Group: -->
     
  • nickl-

    nickl- - 2018-08-02

    Ticket has been migrated to github.
    Please follow up on this over here: https://github.com/beanshell/beanshell/issues/423

     

Log in to post a comment.