Skip to content

Commit d4f80c6

Browse files
authored
Remove couple of deprecated methods (#5385)
1 parent 40699b8 commit d4f80c6

File tree

3 files changed

+1
-69
lines changed

3 files changed

+1
-69
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/ValueInstantiator.java

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
import java.math.BigInteger;
66

77
import com.fasterxml.jackson.databind.*;
8-
import com.fasterxml.jackson.databind.cfg.CoercionAction;
9-
import com.fasterxml.jackson.databind.cfg.CoercionInputShape;
108
import com.fasterxml.jackson.databind.deser.impl.PropertyValueBuffer;
119
import com.fasterxml.jackson.databind.introspect.AnnotatedWithParams;
12-
import com.fasterxml.jackson.databind.type.LogicalType;
1310

1411
/**
1512
* Class that defines simple API implemented by objects that create value
@@ -422,50 +419,6 @@ public Object createFromBoolean(DeserializationContext ctxt, boolean value) thro
422419
*/
423420
public AnnotatedWithParams getWithArgsCreator() { return null; }
424421

425-
/*
426-
/**********************************************************
427-
/* Helper methods
428-
/**********************************************************
429-
*/
430-
431-
/**
432-
* @since 2.4 (demoted from <code>StdValueInstantiator</code>)
433-
* @deprecated Since 2.12 should not handle coercions here
434-
*/
435-
@Deprecated // since 2.12
436-
@SuppressWarnings("resource")
437-
protected Object _createFromStringFallbacks(DeserializationContext ctxt, String value)
438-
throws IOException
439-
{
440-
// also, empty Strings might be accepted as null Object...
441-
if (value.isEmpty()) {
442-
if (ctxt.isEnabled(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)) {
443-
return null;
444-
}
445-
}
446-
447-
/* 28-Sep-2011, tatu: Ok this is not clean at all; but since there are legacy
448-
* systems that expect conversions in some cases, let's just add a minimal
449-
* patch (note: same could conceivably be used for numbers too).
450-
*/
451-
if (canCreateFromBoolean()) {
452-
// 29-May-2020, tatu: With 2.12 can and should use CoercionConfig so:
453-
if (ctxt.findCoercionAction(LogicalType.Boolean, Boolean.class,
454-
CoercionInputShape.String) == CoercionAction.TryConvert) {
455-
String str = value.trim();
456-
if ("true".equals(str)) {
457-
return createFromBoolean(ctxt, true);
458-
}
459-
if ("false".equals(str)) {
460-
return createFromBoolean(ctxt, false);
461-
}
462-
}
463-
}
464-
return ctxt.handleMissingInstantiator(getValueClass(), this, ctxt.getParser(),
465-
"no String-argument constructor/factory method to deserialize from String value ('%s')",
466-
value);
467-
}
468-
469422
/*
470423
/**********************************************************
471424
/* Standard Base implementation (since 2.8)

src/main/java/com/fasterxml/jackson/databind/deser/impl/PropertyBasedCreator.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,6 @@ public static PropertyBasedCreator construct(DeserializationContext ctxt,
163163
caseInsensitive, false);
164164
}
165165

166-
@Deprecated // since 2.9
167-
public static PropertyBasedCreator construct(DeserializationContext ctxt,
168-
ValueInstantiator valueInstantiator, SettableBeanProperty[] srcCreatorProps)
169-
throws JsonMappingException
170-
{
171-
return construct(ctxt, valueInstantiator, srcCreatorProps,
172-
ctxt.isEnabled(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES));
173-
}
174-
175166
/**
176167
* Mutant factory method for constructing a map where the names of all properties
177168
* are transformed using the given {@link NameTransformer}.
@@ -302,11 +293,6 @@ static class CaseInsensitiveMap extends HashMap<String, SettableBeanProperty>
302293
*/
303294
protected final Locale _locale;
304295

305-
@Deprecated // since 2.11
306-
public CaseInsensitiveMap() {
307-
this(Locale.getDefault());
308-
}
309-
310296
// @since 2.11
311297
public CaseInsensitiveMap(Locale l) {
312298
_locale = l;

src/main/java/com/fasterxml/jackson/databind/deser/impl/PropertyValueBuffer.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,7 @@ public PropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramC
119119
}
120120
}
121121

122-
@Deprecated // since 2.18
123-
public PropertyValueBuffer(JsonParser p, DeserializationContext ctxt, int paramCount,
124-
ObjectIdReader oir)
125-
{
126-
this(p, ctxt, paramCount, oir, null);
127-
}
128-
129-
/**
122+
/**
130123
* Returns {@code true} if the given property was seen in the JSON source by
131124
* this buffer.
132125
*

0 commit comments

Comments
 (0)