Skip to content

Commit ebf2a82

Browse files
committed
Warnings cleanup
1 parent 5a98834 commit ebf2a82

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/test/java/com/fasterxml/jackson/databind/cfg/CacheProviderTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*
1919
* @since 2.16
2020
*/
21+
@SuppressWarnings("serial")
2122
public class CacheProviderTest
2223
{
2324

src/test/java/com/fasterxml/jackson/databind/type/RecursiveWildcardTest.java

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.fasterxml.jackson.databind.type;
22

33
import java.util.ArrayList;
4+
import java.util.Arrays;
45
import java.util.List;
56

67
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -16,7 +17,6 @@ static class Tree<T extends Tree<?>> {
1617

1718
final List<T> children;
1819

19-
@SuppressWarnings("DataFlowIssue")
2020
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
2121
public Tree(List<T> children) {
2222
if (!children.stream().allMatch(c -> c instanceof Tree<?>)) {
@@ -64,9 +64,9 @@ public void testRecursiveWildcard() throws Exception
6464
public void testDeserWildcard4118() throws Exception
6565
{
6666
// Given
67-
TestAttribute4118 a = new TestAttribute4118(null);
68-
TestAttribute4118 b = new TestAttribute4118(_listOf(a));
69-
TestAttribute4118 c = new TestAttribute4118(_listOf(b));
67+
TestAttribute4118<?> a = new TestAttribute4118<>(null);
68+
TestAttribute4118<?> b = new TestAttribute4118<>(_listOf(a));
69+
TestAttribute4118<?> c = new TestAttribute4118<>(_listOf(b));
7070
TestObject4118 test = new TestObject4118(_listOf(c));
7171

7272
String serialized = MAPPER.writeValueAsString(test);
@@ -79,8 +79,6 @@ public void testDeserWildcard4118() throws Exception
7979
}
8080

8181
private <T> List<T> _listOf(T elem) {
82-
ArrayList<T> list = new ArrayList<>();
83-
list.add(elem);
84-
return list;
82+
return Arrays.asList(elem);
8583
}
8684
}

0 commit comments

Comments
 (0)