#610 Parsing error when using 'enum' as an identifier

release_1.0
closed
Oliver Burn
5
2013-11-09
2010-05-28
Anonymous
No

I was using version 4.4 and I have just aupgraded to 5.0 and I get now a Parsing exception when parsing this file:

public class Java14Test {
public void testJdk14Enum() {
Enumeration enum = null;
}
}

The parsing exception is thrown because of the 'enum'. However, this is valid Java 1.4 (not Java 1.5 since 'enum' is a reserved keyword in Java 1.5). I was getting no problems with Checkstyle 4.4 but I am not with version 5.0. Was the support for Java 1.4 dropped in version 5.0 of checkstyle? Or is this an actual bug?
Thank you.

Discussion

  • Roman Ivanov
    Roman Ivanov
    2013-11-09

    • status: open --> closed
    • Group: --> release_1.0
     
  • Roman Ivanov
    Roman Ivanov
    2013-11-09

    yes problem exists, but Checkstyle does not support few versions of Java, no way to configure that easily. And now nobody care about java4.