@@ -0,0 +1,2679 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport java.lang.annotation.*;%0A%0Aimport com.fasterxml.jackson.annotation.JsonSetter;%0Aimport com.fasterxml.jackson.annotation.Nulls;%0A%0Aimport com.fasterxml.jackson.databind.*;%0Aimport com.fasterxml.jackson.databind.cfg.*;%0Aimport com.fasterxml.jackson.databind.exc.InvalidNullException;%0Aimport com.fasterxml.jackson.databind.introspect.AnnotatedMember;%0Aimport com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;%0Aimport com.fasterxml.jackson.databind.json.JsonMapper;%0A%0A// Tests for %5Bdatabind#1498%5D (Jackson 2.12)%0Apublic class ConstructorDetector3241Test extends BaseMapTest%0A%7B%0A    // Helper annotation to work around lack of implicit name access with Jackson 2.x%0A    @Target(ElementType.PARAMETER)%0A    @Retention(RetentionPolicy.RUNTIME)%0A    @interface ImplicitName %7B%0A        String value();%0A    %7D%0A%0A    // And annotation introspector to make use of it%0A    @SuppressWarnings(%22serial%22)%0A    static class CtorNameIntrospector extends JacksonAnnotationIntrospector%0A    %7B%0A        @Override%0A        public String findImplicitPropertyName(//MapperConfig%3C?%3E config,%0A                AnnotatedMember member) %7B%0A            final ImplicitName ann = member.getAnnotation(ImplicitName.class);%0A            return (ann == null) ? null : ann.value();%0A        %7D%0A    %7D%0A%0A    // %5Bdatabind#3241%5D%0A    static class Input3241 %7B%0A        private final Boolean field;%0A%0A        // @JsonCreator gone!%0A        public Input3241(@ImplicitName(%22field%22) Boolean field) %7B%0A            if (field == null) %7B%0A                throw new NullPointerException(%22Should not get here!%22);%0A            %7D%0A            this.field = field;%0A        %7D%0A%0A        public Boolean field() %7B%0A          return field;%0A        %7D%0A    %7D%0A%0A    // %5Bdatabind#3241%5D%0A    public void testNullHandlingCreator3241() throws Exception%0A    %7B%0A        ObjectMapper mapper = mapperBuilder()%0A                .constructorDetector(ConstructorDetector.USE_PROPERTIES_BASED) // new!%0A                .defaultSetterInfo(JsonSetter.Value.construct(Nulls.FAIL, Nulls.FAIL))%0A                .build();%0A%0A        try %7B%0A            mapper.readValue(%22%7B %5C%22field%5C%22: null %7D%22, Input3241.class);%0A            fail(%22InvalidNullException expected%22);%0A        %7D catch (InvalidNullException e) %7B%0A            verifyException(e, %22Invalid %60null%60 value encountered%22);%0A        %7D%0A    %7D%0A%0A    /*%0A    /**********************************************************************%0A    /* Helper methods%0A    /**********************************************************************%0A     */%0A%0A    private JsonMapper.Builder mapperBuilder() %7B%0A        return JsonMapper.builder()%0A                .annotationIntrospector(new CtorNameIntrospector());%0A    %7D%0A%7D%0A

Add a failing test for #3241