Skip to content

Commit 431a1f4

Browse files
committed
Moar test proofing
1 parent 2009fd2 commit 431a1f4

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

src/test/java/com/fasterxml/jackson/databind/SerializeUsingJDKTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static class MyPojo {
2727
protected int y;
2828

2929
public MyPojo() { }
30-
public MyPojo(int x0, int y0) {
30+
protected MyPojo(int x0, int y0) {
3131
x = x0;
3232
y = y0;
3333
}
@@ -48,7 +48,7 @@ static class AnyBean {
4848
HashMap<String,Object> _map;
4949

5050
public AnyBean() {
51-
_map = new HashMap<String,Object>();
51+
_map = new HashMap<>();
5252
}
5353

5454
@JsonAnySetter

src/test/java/com/fasterxml/jackson/databind/convert/BeanConversionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static class PointZ {
3131
public int z = -13;
3232

3333
public PointZ() { }
34-
public PointZ(int a, int b, int c)
34+
protected PointZ(int a, int b, int c)
3535
{
3636
x = a;
3737
y = b;

src/test/java/com/fasterxml/jackson/databind/deser/merge/PropertyMergeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static class Config {
3030
public AB loc = new AB(1, 2);
3131

3232
protected Config() { }
33-
public Config(int a, int b) {
33+
protected Config(int a, int b) {
3434
loc = new AB(a, b);
3535
}
3636
}
@@ -52,7 +52,7 @@ static class AB {
5252
public int b;
5353

5454
protected AB() { }
55-
public AB(int a0, int b0) {
55+
protected AB(int a0, int b0) {
5656
a = a0;
5757
b = b0;
5858
}

src/test/java/com/fasterxml/jackson/databind/jsontype/ExistingPropertyTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static class Apple extends Fruit
4040
public String type;
4141

4242
private Apple() { super(null); }
43-
public Apple(String name, int b) {
43+
protected Apple(String name, int b) {
4444
super(name);
4545
seedCount = b;
4646
type = "apple";
@@ -55,7 +55,7 @@ static class Orange extends Fruit
5555
public String type;
5656

5757
private Orange() { super(null); }
58-
public Orange(String name, String c) {
58+
protected Orange(String name, String c) {
5959
super(name);
6060
color = c;
6161
type = "orange";
@@ -90,7 +90,7 @@ static class Dog extends Animal
9090
public int boneCount;
9191

9292
private Dog() { super(null); }
93-
public Dog(String name, int b) {
93+
protected Dog(String name, int b) {
9494
super(name);
9595
boneCount = b;
9696
}
@@ -107,7 +107,7 @@ static class Cat extends Animal
107107
public String furColor;
108108

109109
private Cat() { super(null); }
110-
public Cat(String name, String c) {
110+
protected Cat(String name, String c) {
111111
super(name);
112112
furColor = c;
113113
}
@@ -143,7 +143,7 @@ static class Accord extends Car
143143
public int speakerCount;
144144

145145
private Accord() { super(null); }
146-
public Accord(String name, int b) {
146+
protected Accord(String name, int b) {
147147
super(name);
148148
speakerCount = b;
149149
}
@@ -159,12 +159,12 @@ static class Camry extends Car
159159
public String exteriorColor;
160160

161161
private Camry() { super(null); }
162-
public Camry(String name, String c) {
162+
protected Camry(String name, String c) {
163163
super(name);
164164
exteriorColor = c;
165165
}
166166

167-
public String getType() {
167+
public String getType() {
168168
return "camry";
169169
}
170170
}

src/test/java/com/fasterxml/jackson/databind/objectid/TestObjectIdDeserialization.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static class IdentifiableCustom
9393
public IdentifiableCustom next;
9494

9595
public IdentifiableCustom() { this(-1, 0); }
96-
public IdentifiableCustom(int i, int v) {
96+
protected IdentifiableCustom(int i, int v) {
9797
customId = i;
9898
value = v;
9999
}

src/test/java/com/fasterxml/jackson/databind/objectid/TestObjectIdSerialization.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static class TreeNode
150150
public TreeNode child;
151151

152152
public TreeNode() { }
153-
public TreeNode(TreeNode p, int id, String name) {
153+
protected TreeNode(TreeNode p, int id, String name) {
154154
parent = p;
155155
this.id = id;
156156
this.name = name;

src/test/java/com/fasterxml/jackson/databind/testutil/DatabindTestUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.nio.charset.StandardCharsets;
66
import java.util.*;
77

8+
import com.fasterxml.jackson.annotation.JsonIgnore;
89
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
910

1011
import com.fasterxml.jackson.core.*;
@@ -278,6 +279,8 @@ public static class Point {
278279
public int x, y;
279280

280281
protected Point() { } // for deser
282+
283+
@JsonIgnore
281284
public Point(int x, int y) {
282285
this.x = x;
283286
this.y = y;

0 commit comments

Comments
 (0)