Cleanup and format code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -296,7 +296,7 @@ public final class Metadata {
|
||||
}
|
||||
|
||||
private <T> List<T> add(List<T> items, T item) {
|
||||
List<T> result = new ArrayList<T>(items);
|
||||
List<T> result = new ArrayList<>(items);
|
||||
result.add(item);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class TestProject {
|
||||
|
||||
private TestCompiler compiler;
|
||||
|
||||
private Set<File> sourceFiles = new LinkedHashSet<File>();
|
||||
private Set<File> sourceFiles = new LinkedHashSet<>();
|
||||
|
||||
public TestProject(TemporaryFolder tempFolder, Class<?>... classes)
|
||||
throws IOException {
|
||||
@@ -74,7 +74,7 @@ public class TestProject {
|
||||
return TestProject.this.sourceFolder;
|
||||
}
|
||||
};
|
||||
Set<Class<?>> contents = new HashSet<Class<?>>(Arrays.asList(classes));
|
||||
Set<Class<?>> contents = new HashSet<>(Arrays.asList(classes));
|
||||
contents.addAll(Arrays.asList(ALWAYS_INCLUDE));
|
||||
copySources(contents);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public abstract class AbstractFieldValuesProcessorTests {
|
||||
|
||||
private FieldValuesParser processor;
|
||||
|
||||
private Map<String, Object> values = new HashMap<String, Object>();
|
||||
private Map<String, Object> values = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public synchronized void init(ProcessingEnvironment env) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,7 +56,7 @@ public class LombokExplicitProperties {
|
||||
private Integer number = 0;
|
||||
|
||||
@Getter
|
||||
private final List<String> items = new ArrayList<String>();
|
||||
private final List<String> items = new ArrayList<>();
|
||||
|
||||
// Should be ignored if no annotation is set
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -47,7 +47,7 @@ public class LombokSimpleDataProperties {
|
||||
@Deprecated
|
||||
private Integer number = 0;
|
||||
|
||||
private final List<String> items = new ArrayList<String>();
|
||||
private final List<String> items = new ArrayList<>();
|
||||
|
||||
private final String ignored = "foo";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@ public class LombokSimpleProperties {
|
||||
@Deprecated
|
||||
private Integer number = 0;
|
||||
|
||||
private final List<String> items = new ArrayList<String>();
|
||||
private final List<String> items = new ArrayList<>();
|
||||
|
||||
private final String ignored = "foo";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,11 +39,11 @@ public class SimpleCollectionProperties {
|
||||
|
||||
private List<Float> floats;
|
||||
|
||||
private final Map<String, Integer> namesToIntegers = new HashMap<String, Integer>();
|
||||
private final Map<String, Integer> namesToIntegers = new HashMap<>();
|
||||
|
||||
private final Collection<Byte> bytes = new LinkedHashSet<Byte>();
|
||||
private final Collection<Byte> bytes = new LinkedHashSet<>();
|
||||
|
||||
private final List<Double> doubles = new ArrayList<Double>();
|
||||
private final List<Double> doubles = new ArrayList<>();
|
||||
|
||||
public Map<Integer, String> getIntegersToNames() {
|
||||
return this.integersToNames;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,11 +42,11 @@ public class GenericConfig<T> {
|
||||
private String name;
|
||||
|
||||
@NestedConfigurationProperty
|
||||
private final Bar<String> bar = new Bar<String>();
|
||||
private final Bar<String> bar = new Bar<>();
|
||||
|
||||
private final Map<String, Bar<Integer>> stringToBar = new HashMap<String, Bar<Integer>>();
|
||||
private final Map<String, Bar<Integer>> stringToBar = new HashMap<>();
|
||||
|
||||
private final Map<String, Integer> stringToInteger = new HashMap<String, Integer>();
|
||||
private final Map<String, Integer> stringToInteger = new HashMap<>();
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
@@ -75,7 +75,7 @@ public class GenericConfig<T> {
|
||||
private String name;
|
||||
|
||||
@NestedConfigurationProperty
|
||||
private final Biz<String> biz = new Biz<String>();
|
||||
private final Biz<String> biz = new Biz<>();
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
|
||||
Reference in New Issue
Block a user