Menu

#1458 Class names containing open parenthesis character not allowed

3.x
closed-rejected
nobody
None
5
2018-11-05
2016-06-27
Jeff Jones
No

FindBugs doesn't allow classes with names containing '(' (the open parenthesis character). Why not? It's easy to get one of these classes if you're using groovy and have a method like
void "Verify that (sql) cache is invalidated"().

Allowing parentheses is as simple as removing the check at line 182 in ClassName.java, isValidClassName(). Removing the check doesn't seem to cause any other problems, as far as I can tell.

Thanks.

Discussion

  • Andrey Loskutov

    Andrey Loskutov - 2017-10-22
    • Status: open --> closed-rejected
     
  • DaHoC

    DaHoC - 2018-11-05

    Why did you reject this?
    It is a valid issue that FindBugs is not respecting the official Java class naming identifiers (see http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8).
    Ran into the same issue constellation with groovy

     
  • Andrey Loskutov

    Andrey Loskutov - 2018-11-05

    Please consider to read this: https://sourceforge.net/p/findbugs/bugs/1487/

     

Log in to post a comment.