Janino

Invalid syntax but no compilation errors

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.5.13
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP
  • Number of attachments :
    0

Description

The following syntax throws no errors when compiled with janino even though the syntax is invalid

new SimpleCompiler().cook(new StringReader("public class Test{public Test(){System.out.println(\"Test\"))if(1==1)return;}}"));

notice the

  • double brackets System.out.println(\"Test\"))
  • no semi-colon and begin of the if block

I have tested this with janino v2.5.10. Wonder what is causing this?

Activity

Hide
Varghese C V added a comment -

2.5.13 throws error for the invalid syntax

Show
Varghese C V added a comment - 2.5.13 throws error for the invalid syntax

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: