Make checkstyle require the Java 7 Diamond operator -
is possible make checkstyle require java 7 formatting of diamond operator? want ensure codebase consistently uses new java 7 style, i.e.:
list<string> items = new linkedlist<>();
instead of older:
list<string> items = new linkedlist<string>();
take @ this.
one of users complaining bug in diamond operator grammar:
list list = new arraylist<>(); throws error:unexpected token: >
this bug report closed patch adds support java 7.
according page, 1 of features added was:
4) diamond generics: in presence of diamond, ast looks like: +--type_arguments | +--generic_start +--generic_end
download link patch.
Comments
Post a Comment