#788 - Remove redundant generics.

This commit is contained in:
Greg Turnquist
2019-01-18 12:03:41 -06:00
parent 74647cb5b1
commit 0f696dd637
24 changed files with 76 additions and 125 deletions

View File

@@ -137,7 +137,7 @@ public class Link implements Serializable {
this.template = template;
this.href = template.toString();
this.rel = rel;
this.affordances = new ArrayList<Affordance>();
this.affordances = new ArrayList<>();
}
public Link(String href, String rel, List<Affordance> affordances) {
@@ -153,7 +153,7 @@ public class Link implements Serializable {
* Empty constructor required by the marshalling framework.
*/
protected Link() {
this.affordances = new ArrayList<Affordance>();
this.affordances = new ArrayList<>();
}
/**
@@ -184,7 +184,7 @@ public class Link implements Serializable {
Assert.notNull(affordance, "Affordance must not be null!");
List<Affordance> newAffordances = new ArrayList<Affordance>();
List<Affordance> newAffordances = new ArrayList<>();
newAffordances.addAll(this.affordances);
newAffordances.add(affordance);
@@ -241,7 +241,7 @@ public class Link implements Serializable {
*/
public Link andAffordances(List<Affordance> affordances) {
List<Affordance> newAffordances = new ArrayList<Affordance>();
List<Affordance> newAffordances = new ArrayList<>();
newAffordances.addAll(this.affordances);
newAffordances.addAll(affordances);
@@ -437,7 +437,7 @@ public class Link implements Serializable {
return Collections.emptyMap();
}
Map<String, String> attributes = new HashMap<String, String>();
Map<String, String> attributes = new HashMap<>();
Matcher matcher = KEY_AND_VALUE_PATTERN.matcher(source);
while (matcher.find()) {