Skip to content

Commit

Permalink
Remove unnecessary semicolons (#4535)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philzen committed May 17, 2024
1 parent ac7b179 commit f2045ca
Show file tree
Hide file tree
Showing 20 changed files with 15 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public enum Type {
* {@link com.fasterxml.jackson.annotation.JsonBackReference}
*/
BACK_REFERENCE
;
}

private final Type _type;
Expand Down Expand Up @@ -1111,7 +1110,7 @@ public String[] findEnumValues(MapperConfig<?> config, AnnotatedClass annotatedC
*/
@Deprecated
public void findEnumAliases(Class<?> enumType, Enum<?>[] enumValues, String[][] aliases) {
;
; // do nothing
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fasterxml/jackson/databind/JsonNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public enum OverwriteMode {
* Mode in which all incompatible node types may be replaced, including
* Array and Object nodes where necessary.
*/
ALL;
ALL
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,6 @@ public Prefetch forRootType(ObjectWriter parent, JavaType newType) {
return new Prefetch(newType, ser, null);
} catch (DatabindException e) {
// need to swallow?
;
}
}
return new Prefetch(newType, null, typeSerializer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ public enum Inclusion
* @since 2.3
*/
DEFAULT_INCLUSION
;
}

/**
Expand Down Expand Up @@ -269,6 +268,5 @@ public enum Typing
* @since 2.3
*/
DEFAULT_TYPING
;
}
}
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 com.fasterxml.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 @@ -282,7 +282,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 @@ -964,7 +963,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 @@ -1044,9 +1044,7 @@ protected Object deserializeUsingPropertyBasedWithExternalTypeId(JsonParser p,
// 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))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,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 @@ -330,14 +330,12 @@ public void assignIndex(int index) {
*
* @since 2.8.3
*/
public void fixAccess(DeserializationConfig config) {
;
}
public void fixAccess(DeserializationConfig config) { /* nop */ }

/**
* @since 2.9.4
*/
public void markAsIgnorable() { }
public void markAsIgnorable() { /* nop */ }

/**
* @since 2.9.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,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 @@ -332,7 +330,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 @@ -419,7 +419,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 @@ -823,7 +823,6 @@ protected final JsonNode _fromBigDecimal(DeserializationContext ctxt,
bigDec = bigDec.stripTrailingZeros();
} catch (ArithmeticException e) {
// If we can't, we can't...
;
}
}
return nodeFactory.numberNode(bigDec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,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 @@ -274,7 +274,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 @@ -284,7 +284,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
;
}
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,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: "+e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class ISO8601DateFormat extends DateFormat
private static final long serialVersionUID = 1L;

public ISO8601DateFormat() {
this.numberFormat = new DecimalFormat();;
this.calendar = new GregorianCalendar();;
this.numberFormat = new DecimalFormat();
this.calendar = new GregorianCalendar();
}

@Override
Expand Down

0 comments on commit f2045ca

Please sign in to comment.