Skip to content

Commit

Permalink
Fix warning: Use parameterized types instead of raw types
Browse files Browse the repository at this point in the history
  • Loading branch information
sepe81 committed Nov 18, 2019
1 parent 12ed52e commit 0c17c65
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ public void testBuildAllowedMethods() throws Exception {
// tag body (as reported with WW-5029).
final String fakeBodyString = "allowedMethod1,allowedMethod2,allowedMethod3";
PackageConfig.Builder testPackageConfigBuilder = new PackageConfig.Builder("allowedMethodsPackage");
List<String> singleStringList = new ArrayList(1);
List<String> multipleStringList = new ArrayList(4);
List<String> singleStringList = new ArrayList<>(1);
List<String> multipleStringList = new ArrayList<>(4);
singleStringList.add(fakeBodyString);
multipleStringList.add("allowedMethod1,");
multipleStringList.add("allowed");
Expand Down Expand Up @@ -379,8 +379,8 @@ public void testLoadGlobalAllowedMethods() throws Exception {
// tag body (as reported with WW-5029).
final String fakeBodyString = "allowedMethod1,allowedMethod2,allowedMethod3";
PackageConfig.Builder testPackageConfigBuilder = new PackageConfig.Builder("globalAllowedMethodsPackage");
List<String> singleStringList = new ArrayList(1);
List<String> multipleStringList = new ArrayList(4);
List<String> singleStringList = new ArrayList<>(1);
List<String> multipleStringList = new ArrayList<>(4);
singleStringList.add(fakeBodyString);
multipleStringList.add("allowedMethod4,");
multipleStringList.add("allowed");
Expand Down Expand Up @@ -447,10 +447,10 @@ public void testBuildResults() throws Exception {
resultTypeConfigBuilder.defaultResultParam(resultParam);
ResultTypeConfig resultTypeConfig = resultTypeConfigBuilder.build();
testPackageConfigBuilder.addResultTypeConfig(resultTypeConfig);
List<String> singleStringList = new ArrayList(1);
List<String> singleStringList2 = new ArrayList(1);
List<String> multipleStringList = new ArrayList(4);
List<String> multipleStringList2 = new ArrayList(4);
List<String> singleStringList = new ArrayList<>(1);
List<String> singleStringList2 = new ArrayList<>(1);
List<String> multipleStringList = new ArrayList<>(4);
List<String> multipleStringList2 = new ArrayList<>(4);
singleStringList.add(fakeBodyString);
singleStringList2.add(fakeBodyString2);
multipleStringList.add("/SomePath");
Expand Down Expand Up @@ -538,10 +538,10 @@ public void testLoadGlobalResults() throws Exception {
resultTypeConfigBuilder.defaultResultParam(resultParam);
ResultTypeConfig resultTypeConfig = resultTypeConfigBuilder.build();
testPackageConfigBuilder.addResultTypeConfig(resultTypeConfig);
List<String> singleStringList = new ArrayList(1);
List<String> singleStringList2 = new ArrayList(1);
List<String> multipleStringList = new ArrayList(4);
List<String> multipleStringList2 = new ArrayList(4);
List<String> singleStringList = new ArrayList<>(1);
List<String> singleStringList2 = new ArrayList<>(1);
List<String> multipleStringList = new ArrayList<>(4);
List<String> multipleStringList2 = new ArrayList<>(4);
singleStringList.add(fakeBodyString);
singleStringList2.add(fakeBodyString2);
multipleStringList.add("/SomePath");
Expand Down Expand Up @@ -663,7 +663,7 @@ protected class MockNodeList implements org.w3c.dom.NodeList {
List<Node> nodeList;

public MockNodeList() {
this.nodeList = new ArrayList(0);
this.nodeList = new ArrayList<>(0);
}

/**
Expand All @@ -675,24 +675,24 @@ public MockNodeList() {
public MockNodeList(List<String> stringList) {
if (stringList != null) {
final int nodeListLength = stringList.size();
this.nodeList = new ArrayList(nodeListLength);
this.nodeList = new ArrayList<>(nodeListLength);
for (int index = 0; index < nodeListLength; index++) {
this.nodeList.add(new MockNode("node" + index, stringList.get(index), Node.TEXT_NODE, null, null));
}
} else {
this.nodeList = new ArrayList(0);
this.nodeList = new ArrayList<>(0);
}
}

public MockNodeList(NodeList nodeList) {
if (nodeList != null) {
final int nodeListLength = nodeList.getLength();
this.nodeList = new ArrayList(nodeListLength);
this.nodeList = new ArrayList<>(nodeListLength);
for (int index = 0; index < nodeListLength; index++) {
this.nodeList.add(nodeList.item(index));
}
} else {
this.nodeList = new ArrayList(0);
this.nodeList = new ArrayList<>(0);
}
}

Expand All @@ -703,7 +703,7 @@ public void addToNodeList(List<Node> nodeList) {
this.nodeList.add(nodeList.get(index));
}
} else {
this.nodeList = new ArrayList(0);
this.nodeList = new ArrayList<>(0);
}
}

Expand Down

0 comments on commit 0c17c65

Please sign in to comment.