Skip to content

Commit 2009fd2

Browse files
committed
More test robustification (wrt 3.0 changes)
1 parent f8f9a13 commit 2009fd2

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

src/test/java/com/fasterxml/jackson/databind/introspect/TestNamingStrategyCustom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static class PersonBean {
113113
public int age;
114114

115115
public PersonBean() { this(null, null, 0); }
116-
public PersonBean(String f, String l, int a)
116+
protected PersonBean(String f, String l, int a)
117117
{
118118
firstName = f;
119119
lastName = l;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static class Sub extends SuperTypeWithoutDefault {
7575
public int a;
7676

7777
public Sub(){}
78-
public Sub(int a) {
78+
protected Sub(int a) {
7979
this.a = a;
8080
}
8181
}
@@ -87,7 +87,7 @@ static class POJOWrapper {
8787
Sub sub2;
8888

8989
public POJOWrapper(){}
90-
public POJOWrapper(Sub sub1, Sub sub2) {
90+
protected POJOWrapper(Sub sub1, Sub sub2) {
9191
this.sub1 = sub1;
9292
this.sub2 = sub2;
9393
}
@@ -164,7 +164,7 @@ static class Impl1125 extends Interm1125 {
164164
public int c;
165165

166166
public Impl1125() { }
167-
public Impl1125(int a0, int b0, int c0) {
167+
protected Impl1125(int a0, int b0, int c0) {
168168
a = a0;
169169
b = b0;
170170
c = c0;
@@ -175,7 +175,7 @@ static class Default1125 extends Interm1125 {
175175
public int def;
176176

177177
Default1125() { }
178-
public Default1125(int a0, int b0, int def0) {
178+
protected Default1125(int a0, int b0, int def0) {
179179
a = a0;
180180
b = b0;
181181
def = def0;

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
public class TestTypeNames extends DatabindTestUtil
2323
{
2424
@SuppressWarnings("serial")
25-
static class AnimalMap extends LinkedHashMap<String,Animal> { }
25+
static class AnimalMap extends LinkedHashMap<String, Animal> { }
2626

2727
@JsonTypeInfo(property = "type", include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME)
2828
@JsonSubTypes({
@@ -134,7 +134,6 @@ class Animal
134134
{
135135
public String name;
136136

137-
138137
@Override
139138
public boolean equals(Object o) {
140139
if (o == this) return true;
@@ -154,7 +153,7 @@ class Dog extends Animal
154153
public int ageInYears;
155154

156155
public Dog() { }
157-
public Dog(String n, int y) {
156+
protected Dog(String n, int y) {
158157
name = n;
159158
ageInYears = y;
160159
}
@@ -173,7 +172,7 @@ public boolean equals(Object o) {
173172
abstract class Cat extends Animal {
174173
public boolean purrs;
175174
public Cat() { }
176-
public Cat(String n, boolean p) {
175+
protected Cat(String n, boolean p) {
177176
name = n;
178177
purrs = p;
179178
}
@@ -194,15 +193,15 @@ public String toString() {
194193
*/
195194
class MaineCoon extends Cat {
196195
public MaineCoon() { super(); }
197-
public MaineCoon(String n, boolean p) {
196+
protected MaineCoon(String n, boolean p) {
198197
super(n, p);
199198
}
200199
}
201200

202201
@JsonTypeName("persialaisKissa")
203202
class Persian extends Cat {
204203
public Persian() { super(); }
205-
public Persian(String n, boolean p) {
204+
protected Persian(String n, boolean p) {
206205
super(n, p);
207206
}
208207
}

src/test/java/com/fasterxml/jackson/databind/jsontype/deftyping/DefaultWithBaseType1093Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static class Point1093 {
2020
public int x, y;
2121

2222
protected Point1093() { }
23-
public Point1093(int _x, int _y) {
23+
protected Point1093(int _x, int _y) {
2424
x = _x;
2525
y = _y;
2626
}

src/test/java/com/fasterxml/jackson/databind/jsontype/ext/TestSubtypesExternalPropertyMissingProperty.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static class Box {
2727
public Box() {
2828
}
2929

30-
public Box(String type, Fruit fruit) {
30+
protected Box(String type, Fruit fruit) {
3131
this.type = type;
3232
this.fruit = fruit;
3333
}
@@ -45,7 +45,7 @@ static class ReqBox {
4545
public ReqBox() {
4646
}
4747

48-
public ReqBox(String type, Fruit fruit) {
48+
protected ReqBox(String type, Fruit fruit) {
4949
this.type = type;
5050
this.fruit = fruit;
5151
}
@@ -72,7 +72,7 @@ static class Apple extends Fruit {
7272
public Apple() {
7373
}
7474

75-
public Apple(String name, int b) {
75+
protected Apple(String name, int b) {
7676
super(name);
7777
seedCount = b;
7878
}
@@ -84,7 +84,7 @@ static class Orange extends Fruit {
8484
public Orange() {
8585
}
8686

87-
public Orange(String name, String c) {
87+
protected Orange(String name, String c) {
8888
super(name);
8989
color = c;
9090
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static class Parent
3535

3636
protected Parent() { }
3737

38-
public Parent(String name, boolean ignored) {
38+
protected Parent(String name, boolean ignored) {
3939
children = new TreeMap<String, Child>();
4040
this.name = name;
4141
}

0 commit comments

Comments
 (0)