Skip to content

Commit 9c4263d

Browse files
committed
minor clean up
1 parent f42409c commit 9c4263d

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

guava/src/main/java/com/fasterxml/jackson/datatype/guava/deser/RangeDeserializer.java

+6-13
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,18 @@ public class RangeDeserializer
4343
* @since 2.10
4444
*/
4545
protected final RangeHelper.RangeProperties _fieldNames;
46-
46+
4747
/*
4848
/**********************************************************
4949
/* Life-cycle
5050
/**********************************************************
5151
*/
5252

53-
/**
54-
* @deprecated Since 2.7
55-
*/
56-
@Deprecated // since 2.7
57-
public RangeDeserializer(JavaType rangeType) {
58-
this(null, rangeType);
59-
}
60-
6153
public RangeDeserializer(BoundType defaultBoundType, JavaType rangeType) {
6254
this(rangeType, null, defaultBoundType);
6355
}
6456

57+
@Deprecated // since 2.12
6558
public RangeDeserializer(JavaType rangeType, JsonDeserializer<?> endpointDeser) {
6659
this(rangeType, endpointDeser, null);
6760
}
@@ -124,7 +117,7 @@ public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
124117
/* Actual deserialization
125118
/**********************************************************
126119
*/
127-
120+
128121
@Override
129122
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt,
130123
TypeDeserializer typeDeserializer)
@@ -178,9 +171,9 @@ public Range<?> deserialize(JsonParser p, DeserializationContext context)
178171
try {
179172
if ((lowerEndpoint != null) && (upperEndpoint != null)) {
180173
Preconditions.checkState(lowerEndpoint.getClass() == upperEndpoint.getClass(),
181-
"Endpoint types are not the same - 'lowerEndpoint' deserialized to [%s], and 'upperEndpoint' deserialized to [%s].",
182-
lowerEndpoint.getClass().getName(),
183-
upperEndpoint.getClass().getName());
174+
"Endpoint types are not the same - 'lowerEndpoint' deserialized to [%s], and 'upperEndpoint' deserialized to [%s].",
175+
lowerEndpoint.getClass().getName(),
176+
upperEndpoint.getClass().getName());
184177
Preconditions.checkState(lowerBoundType != null, "'lowerEndpoint' field found, but not 'lowerBoundType'");
185178
Preconditions.checkState(upperBoundType != null, "'upperEndpoint' field found, but not 'upperBoundType'");
186179
return RangeFactory.range(lowerEndpoint, lowerBoundType, upperEndpoint, upperBoundType);

guava/src/main/java/com/fasterxml/jackson/datatype/guava/ser/RangeSerializer.java

-6
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ public RangeSerializer(JavaType type, JsonSerializer<?> endpointSer,
5454
_fieldNames = fieldNames;
5555
}
5656

57-
@Override
58-
@Deprecated
59-
public boolean isEmpty(Range<?> value) {
60-
return isEmpty(null, value);
61-
}
62-
6357
@Override
6458
public boolean isEmpty(SerializerProvider prov, Range<?> value) {
6559
return value.isEmpty();

0 commit comments

Comments
 (0)