Skip to content

Commit 84eca86

Browse files
committed
forgot to check in test change
1 parent b88ce67 commit 84eca86

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/test/java/com/fasterxml/jackson/databind/introspect/TestScalaLikeImplicitProperties.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.fasterxml.jackson.databind.introspect;
22

3+
import com.fasterxml.jackson.annotation.JsonCreator;
34
import com.fasterxml.jackson.databind.*;
5+
import com.fasterxml.jackson.databind.cfg.MapperConfig;
46

57
/**
68
* Tests Scala-style JVM naming patterns for properties.
@@ -49,13 +51,21 @@ public String findImplicitPropertyName(AnnotatedMember member) {
4951
return null;
5052
}
5153

54+
/* Deprecated since 2.9
5255
@Override
5356
public boolean hasCreatorAnnotation(Annotated a) {
54-
// A placeholder for legitmate creator detection.
57+
return (a instanceof AnnotatedConstructor);
58+
}
59+
*/
60+
61+
@Override
62+
public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated a) {
63+
// A placeholder for legitimate creator detection.
5564
// In Scala, all primary constructors should be creators,
5665
// but I can't obtain a reference to the AnnotatedClass from the
5766
// AnnotatedConstructor, so it's simulated here.
58-
return (a instanceof AnnotatedConstructor);
67+
return (a instanceof AnnotatedConstructor)
68+
? JsonCreator.Mode.DEFAULT : null;
5969
}
6070
}
6171

0 commit comments

Comments
 (0)