Skip to content

Commit

Permalink
Merge branch '2.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 17, 2024
2 parents e659f41 + f2045ca commit fec64f9
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/main/java/tools/jackson/databind/ObjectWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,6 @@ public Prefetch forRootType(ObjectWriter parent, JavaType newType) {
return new Prefetch(newType, ser, null);
} catch (JacksonException e) {
// need to swallow?
;
}
}
return new Prefetch(newType, null, typeSerializer);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/tools/jackson/databind/cfg/CoercionAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ public enum CoercionAction
* empty collection; for POJOs instance configured with default constructor
* and so on.
*/
AsEmpty;
;
AsEmpty
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,4 @@ public enum CoercionInputShape
*/
EmptyString

;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public enum SingleArgConstructor {
* {@link tools.jackson.databind.exc.InvalidDefinitionException}
* in ambiguous case.
*/
REQUIRE_MODE;
REQUIRE_MODE
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ protected ValueInstantiator _constructDefaultValueInstantiator(DeserializationCo
final boolean isNonStaticInnerClass = beanDesc.isNonStaticInnerClass();
if (isNonStaticInnerClass) {
// TODO: look for `@JsonCreator` annotated ones, throw explicit exception?
;
} else {
// 18-Sep-2020, tatu: Although by default implicit introspection is allowed, 2.12
// has settings to prevent that either generally, or at least for JDK types
Expand Down Expand Up @@ -904,7 +903,6 @@ protected void _addExplicitAnyCreator(DeserializationContext ctxt,
if (!useProps) {
// Otherwise, `@JsonValue` suggests delegation
if (beanDesc.findJsonValueAccessor() != null) {
;
} else if (injectId != null) {
// But Injection suggests property-based (for legacy reasons?)
useProps = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ protected void addBeanProps(DeserializationContext ctxt,
// 23-Jan-2018, tatu: As per [databind#1805], need to ensure we don't
// accidentally sneak in getter-as-setter for `READ_ONLY` properties
if (builder.hasIgnorable(propDef.getName())) {
;
; // skip
} else {
prop = constructSetterlessProperty(ctxt, beanDesc, propDef);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,7 @@ protected Object deserializeUsingPropertyBasedWithExternalTypeId(JsonParser p, D
// first: let's check to see if this might be part of value with external type id:
// 11-Sep-2015, tatu: Important; do NOT pass buffer as last arg, but null,
// since it is not the bean
if (ext.handlePropertyValue(p, ctxt, propName, null)) {
;
} else {
if (!ext.handlePropertyValue(p, ctxt, propName, null)) {
// Last creator property to set?
if (buffer.assignParameter(creatorProp, _deserializeWithErrorWrapping(p, ctxt, creatorProp))) {
t = p.nextToken(); // to move to following PROPERTY_NAME/END_OBJECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ protected boolean verifyNonDup(AnnotatedWithParams newOne, int typeIndex, boolea
if (_isEnumValueOf(newOne)) {
return false; // ignore
}
if (_isEnumValueOf(oldOne)) {
;
} else {
if (!_isEnumValueOf(oldOne)) {
_reportDuplicateCreator(typeIndex, explicit, oldOne, newOne);
}
}
Expand All @@ -323,7 +321,6 @@ else if (newType.isAssignableFrom(oldType)) {
return false;
} else if (oldType.isAssignableFrom(newType)) {
// new type more specific, use it
;
// 23-Feb-2021, tatu: due to [databind#3062], backwards-compatibility,
// let's allow "primitive/Wrapper" case and tie-break in favor
// of PRIMITIVE argument (null would never map to scalar creators,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ private final Object _deserializeAltString(JsonParser p, DeserializationContext
// index yet (might need combination of "Does format have Numbers"
// (XML does not f.ex) and new `EnumFeature`. But can disallow "001" etc.
if (c == '0' && name.length() > 1) {
;
; // skip
} else {
try {
int index = Integer.parseInt(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public enum Validity {
* determination will be {@code DENIED}, for safety reasons.
*/
INDETERMINATE
;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public void validateSubType(DeserializationContext ctxt, JavaType type,
// for some Spring framework types
// 05-Jan-2017, tatu: ... also, only applies to classes, not interfaces
if (raw.isInterface()) {
;
; // skip
} else if (full.startsWith(PREFIX_SPRING)) {
for (Class<?> cls = raw; (cls != null) && (cls != Object.class); cls = cls.getSuperclass()){
String name = cls.getSimpleName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ protected JavaType findSerializationType(Annotated a, boolean useStaticTyping, J
// Must be a super type to be usable
Class<?> rawDeclared = declaredType.getRawClass();
if (serClass.isAssignableFrom(rawDeclared)) {
; // fine as is
// fine as is
} else {
/* 18-Nov-2010, tatu: Related to fixing [JACKSON-416], an issue with such
* check is that for deserialization more specific type makes sense;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ public enum AccessPattern {
* needed.
*/
DYNAMIC
;
}
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/databind/util/ClassUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public static <T> Constructor<T> findConstructor(Class<T> cls, boolean forceAcce
}
return ctor;
} catch (NoSuchMethodException e) {
;
return null;
} catch (Exception e) {
ClassUtil.unwrapAndThrowAsIAE(e, "Failed to find default constructor of class "+cls.getName()
+", problem: "+exceptionMessage(e));
Expand Down

0 comments on commit fec64f9

Please sign in to comment.