Cleanup and format code

This commit is contained in:
Phillip Webb
2017-03-06 16:44:31 -08:00
parent c7b46e4d1c
commit d8f827d224
649 changed files with 1922 additions and 2003 deletions

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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) {

View File

@@ -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")

View File

@@ -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";

View File

@@ -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";

View File

@@ -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;

View File

@@ -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;