Polish “Remove explicit type arguments”

Closes gh-10494
This commit is contained in:
Andy Wilkinson
2017-10-24 14:44:08 +01:00
parent 6168fae720
commit 2b426c30a6
25 changed files with 65 additions and 86 deletions

View File

@@ -77,8 +77,7 @@ public class ItemHint implements Comparable<ItemHint> {
}
public static ItemHint newHint(String name, ValueHint... values) {
return new ItemHint(name, Arrays.asList(values),
Collections.emptyList());
return new ItemHint(name, Arrays.asList(values), Collections.emptyList());
}
@Override

View File

@@ -818,13 +818,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
@Test
public void mergingOfHintWithProvider() throws Exception {
writeAdditionalHints(new ItemHint("simple.theName",
Collections.emptyList(),
Arrays.asList(
new ItemHint.ValueProvider("first",
Collections.singletonMap("target",
"org.foo")),
new ItemHint.ValueProvider("second", null))));
writeAdditionalHints(
new ItemHint("simple.theName",
Collections
.emptyList(),
Arrays.asList(
new ItemHint.ValueProvider("first",
Collections.singletonMap("target", "org.foo")),
new ItemHint.ValueProvider("second", null))));
ConfigurationMetadata metadata = compile(SimpleProperties.class);
assertThat(metadata).has(Metadata.withProperty("simple.the-name", String.class)
.fromSource(SimpleProperties.class)

View File

@@ -57,9 +57,8 @@ public class JsonMarshallerTests {
metadata.add(new ItemHint("d", null,
Arrays.asList(
new ItemHint.ValueProvider("first",
Collections.singletonMap("target",
"foo")),
new ItemHint.ValueProvider("second", null))));
Collections.singletonMap("target", "foo")),
new ItemHint.ValueProvider("second", null))));
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
JsonMarshaller marshaller = new JsonMarshaller();
marshaller.write(metadata, outputStream);