Use diamond operator in test code. #1555

Fixes `Convert2Diamond` inspection violations.

Description:
>This inspection reports all new expressions with type arguments which can be replaced with diamond type <>
Such <> syntax is not supported under Java 1.6 or earlier JVMs.
This commit is contained in:
Michal Kordas 2015-08-16 22:33:49 +02:00 committed by Roman Ivanov
parent f45fee0aa4
commit 902e761e1a
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ public class ConfigurationBuilder extends BaseCheckTestSupport {
private File ROOT;
private List<File> files = new ArrayList<File>();
private List<File> files = new ArrayList<>();
Configuration config;
@ -100,7 +100,7 @@ public class ConfigurationBuilder extends BaseCheckTestSupport {
public Integer[] getLinesWithWarn(String aFileName) throws IOException {
int lineNumber = 1;
List<Integer> result = new ArrayList<Integer>();
List<Integer> result = new ArrayList<>();
try(BufferedReader br = new BufferedReader(new FileReader(aFileName))) {
for(String line; (line = br.readLine()) != null; ) {
if (warnPattern.matcher(line).find()) {