Skip to content

Commit 33521f0

Browse files
committed
...
1 parent fbe56f1 commit 33521f0

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

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

+25-19
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@ private void _testEnumFromEmptyGlobalConfig(final CoercionInputShape shape, fina
102102
assertEquals(ENUM_DEFAULT, _verifyFromEmptyPass(mapper, json));
103103
}
104104

105-
private ObjectMapper _globMapper(CoercionInputShape shape, CoercionAction act,
106-
Boolean allowEmpty)
107-
{
108-
ObjectMapper mapper = newJsonMapper();
109-
mapper.coercionConfigDefaults().setCoercion(shape, act)
110-
.setAcceptBlankAsEmpty(allowEmpty);
111-
return mapper;
112-
}
113-
114105
private void _testEnumFromEmptyLogicalTypeConfig(final CoercionInputShape shape, final String json,
115106
Boolean allowEmpty)
116107
throws Exception
@@ -142,15 +133,6 @@ private void _testEnumFromEmptyLogicalTypeConfig(final CoercionInputShape shape,
142133
_verifyFromEmptyFail(mapper, json);
143134
}
144135

145-
private ObjectMapper _logMapper(LogicalType type, CoercionInputShape shape, CoercionAction act,
146-
Boolean allowEmpty)
147-
{
148-
ObjectMapper mapper = newJsonMapper();
149-
mapper.coercionConfigFor(type).setCoercion(shape, act)
150-
.setAcceptBlankAsEmpty(allowEmpty);
151-
return mapper;
152-
}
153-
154136
private void _testEnumFromEmptyPhysicalTypeConfig(final CoercionInputShape shape, final String json,
155137
Boolean allowEmpty)
156138
throws Exception
@@ -180,6 +162,30 @@ private void _testEnumFromEmptyPhysicalTypeConfig(final CoercionInputShape shape
180162
_verifyFromEmptyFail(mapper, json);
181163
}
182164

165+
/*
166+
/********************************************************
167+
/* Mapper construction helpers
168+
/********************************************************
169+
*/
170+
171+
private ObjectMapper _globMapper(CoercionInputShape shape, CoercionAction act,
172+
Boolean allowEmpty)
173+
{
174+
ObjectMapper mapper = newJsonMapper();
175+
mapper.coercionConfigDefaults().setCoercion(shape, act)
176+
.setAcceptBlankAsEmpty(allowEmpty);
177+
return mapper;
178+
}
179+
180+
private ObjectMapper _logMapper(LogicalType type, CoercionInputShape shape, CoercionAction act,
181+
Boolean allowEmpty)
182+
{
183+
ObjectMapper mapper = newJsonMapper();
184+
mapper.coercionConfigFor(type).setCoercion(shape, act)
185+
.setAcceptBlankAsEmpty(allowEmpty);
186+
return mapper;
187+
}
188+
183189
private ObjectMapper _physMapper(Class<?> type, CoercionInputShape shape, CoercionAction act,
184190
Boolean allowEmpty)
185191
{
@@ -188,7 +194,7 @@ private ObjectMapper _physMapper(Class<?> type, CoercionInputShape shape, Coerci
188194
.setAcceptBlankAsEmpty(allowEmpty);
189195
return mapper;
190196
}
191-
197+
192198
/*
193199
/********************************************************
194200
/* Verification helper methods

0 commit comments

Comments
 (0)