@Override public Version getMapperVersion() { return version(); }
/** * @since 2.1 */ protected void _checkInvalidCopy(Class<?> exp) { if (getClass() != exp) { // 10-Nov-2016, tatu: could almost use `ClassUtil.verifyMustOverride()` but not quite throw new IllegalStateException("Failed copy(): "+getClass().getName() +" (version: "+version()+") does not override copy(); it has to"); } }
private static void registerAfterburnerModule() { /* * Avoiding java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ser.BeanPropertyWriter.isUnwrapping() * This happens, if the version of jackson databind less that the Afterburner version. * * One reason can be maven, because it resolves a version conflict with the nearest-wins strategy it is possible that * jackson-module-afterburner is in a higher version that jackson-databind and jackson-core * * Another reason could be that a application server bundled version of jackson databind is used */ final AfterburnerModule afterburnerModule = new AfterburnerModule(); if (versionsMatch(MAPPER.version(), afterburnerModule.version())) { MAPPER.registerModule(afterburnerModule); } }
public static <T> ObjectReader getObjectReader(Class<T> type) { final ObjectReader objectReader; if (getMapper().version().compareTo(new Version(2, 6, 0, null, "com.fasterxml.jackson.core", "jackson-databind")) >= 0) { objectReader = getMapper().readerFor(type); } else { objectReader = getMapper().reader(type); } return objectReader; } private static class AfterburnerModuleRegisterer {
@Override public Version getMapperVersion() { return version(); }
@Override public Version getMapperVersion() { return version(); }
@Override public Version getMapperVersion() { return version(); }
@Override public Version getMapperVersion() { return version(); }
public Version getMapperVersion() { return version(); }
public Version getMapperVersion() { return version(); }
/** * @since 2.1 */ protected void _checkInvalidCopy(Class<?> exp) { if (getClass() != exp) { throw new IllegalStateException("Failed copy(): "+getClass().getName() +" (version: "+version()+") does not override copy(); it has to"); } }
/** * @since 2.1 * @param exp */ protected void _checkInvalidCopy(Class<?> exp) { if (getClass() != exp) { throw new IllegalStateException("Failed copy(): "+getClass().getName() +" (version: "+version()+") does not override copy(); it has to"); } }
/** * @since 2.1 */ protected void _checkInvalidCopy(Class<?> exp) { if (getClass() != exp) { // 10-Nov-2016, tatu: could almost use `ClassUtil.verifyMustOverride()` but not quite throw new IllegalStateException("Failed copy(): "+getClass().getName() +" (version: "+version()+") does not override copy(); it has to"); } }
/** * @since 2.1 */ protected void _checkInvalidCopy(Class<?> exp) { if (getClass() != exp) { throw new IllegalStateException("Failed copy(): "+getClass().getName() +" (version: "+version()+") does not override copy(); it has to"); } }
/** * @since 2.1 */ protected void _checkInvalidCopy(Class<?> exp) { if (getClass() != exp) { throw new IllegalStateException("Failed copy(): "+getClass().getName() +" (version: "+version()+") does not override copy(); it has to"); } }