Problem: an anonymous inner class might also be used to extend a superclass and just override one of its methods. And the inner class name is not available in the AST Groovy 1.7, but is available in 1.8. Once we can standardize on Groovy 1.8+, we can implement a rule that checks for the predefined set of one-method interfaces in the JDK. See #171: https://sourceforge.net/p/codenarc/feature-requests/171/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll do it.
Thanks,
Victor
Problem: an anonymous inner class might also be used to extend a superclass and just override one of its methods. And the inner class name is not available in the AST Groovy 1.7, but is available in 1.8. Once we can standardize on Groovy 1.8+, we can implement a rule that checks for the predefined set of one-method interfaces in the JDK. See #171:
https://sourceforge.net/p/codenarc/feature-requests/171/