Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private static MethodHandle getFromCache(Field key, Class<?> clazz, String clazz
try {
lookupToUse = ReflectionUtilsApi.INSTANCE.getLookupToUse(clazz);
} catch (Exception ex) {
logger.verbose("Failed to retrieve MethodHandles.Lookup for field {}.", field, ex);
logger.verbose("Failed to retrieve MethodHandles.Lookup for field {}. Will attempt to make field accessible.", field, ex);

// In a previous implementation compute returned null here in an attempt to indicate that there is no
// setter for the field. Unfortunately, null isn't a valid indicator to computeIfAbsent that a
Expand All @@ -146,7 +146,9 @@ private static MethodHandle getFromCache(Field key, Class<?> clazz, String clazz

return handle;
} catch (ReflectiveOperationException ex) {
logger.verbose("Failed to retrieve MethodHandle for setter {} on class {}.", setterName,
logger.verbose("Failed to retrieve MethodHandle for setter {} on class {}. "
+ "Will attempt to make field accessible. "
+ "Please consider adding public setter.", setterName,
clazzSimpleName, ex);
}

Expand All @@ -159,8 +161,9 @@ private static MethodHandle getFromCache(Field key, Class<?> clazz, String clazz

return handle;
} catch (ReflectiveOperationException ex) {
logger.verbose("Failed to unreflect MethodHandle for setter {} on class {}.", setterName,
clazzSimpleName, ex);
logger.verbose("Failed to unreflect MethodHandle for setter {} on class {}."
+ "Will attempt to make field accessible. "
+ "Please consider adding public setter.", setterName, clazzSimpleName, ex);
}

// In a previous implementation compute returned null here in an attempt to indicate that there is no setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,17 @@ private void checkVersion(SemanticVersion version, String packageName) {
}

if (version.compareTo(MIN_SUPPORTED_VERSION) < 0) {
LOGGER.error("Version '{}' of package '{}' is not supported (older than earliest supported version - `{}`)"
+ ", please upgrade.", version.getVersionString(), packageName, MIN_SUPPORTED_VERSION);
LOGGER.warning("Version '{}' of package '{}' is not supported (older than earliest supported version - `{}`)."
+ " It may result in runtime exceptions during serialization. Please consider updating Jackson to one of the supported versions {}",
version.getVersionString(),
packageName,
MIN_SUPPORTED_VERSION,
TROUBLESHOOTING_DOCS_LINK);
}

if (version.getMajorVersion() > MAX_SUPPORTED_MAJOR_VERSION) {
LOGGER.error("Major version '{}' of package '{}' is newer than latest supported version - '{}'.",
LOGGER.warning("Major version '{}' of package '{}' is newer than latest supported version - '{}'."
+ " It may result in runtime exceptions during serialization.",
version.getVersionString(),
packageName,
MAX_SUPPORTED_MAJOR_VERSION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ final class MemberNameConverterImpl implements MemberNameConverter {
MethodType.methodType(String.class, AnnotatedMethod.class, String.class));
useReflectionForMemberName = true;
} catch (LinkageError | ReflectiveOperationException ex) {
LOGGER.verbose("Failed to retrieve MethodHandles used to get naming strategy. Falling back to BeanUtils.",
ex);
LOGGER.verbose("Failed to retrieve MethodHandles used to get naming strategy. Falling back to BeanUtils. "
+ "Please consider updating your Jackson dependencies to at least version 2.12", ex);
}

GET_ACCESSOR_NAMING = getAccessorNaming;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ private ObjectMapperFactory() {
}

LOGGER.verbose("Failed to retrieve MethodHandles used to set coercion configurations. "
+ "Setting coercion configurations will be skipped.", ex);
+ "Setting coercion configurations will be skipped. "
+ "Please update your Jackson dependencies to at least version 2.12", ex);
}
}

Expand Down