Skip to content

Commit

Permalink
Minor renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 13, 2024
1 parent 3c66ce4 commit 92364f2
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@

public class JsonCreatorNoArgs4777Test extends DatabindTestUtil
{
static class Foo {
private Foo() { }
static class Foo4777 {
private Foo4777() { }

@JsonCreator
static Foo create() {
return new Foo();
static Foo4777 create() {
return new Foo4777();
}
}

static class Instantiators implements ValueInstantiators {
static class Instantiators4777 implements ValueInstantiators {
@Override
public ValueInstantiator findValueInstantiator(
DeserializationConfig config,
BeanDescription beanDesc,
ValueInstantiator defaultInstantiator
) {
if (beanDesc.getBeanClass() == Foo.class) {
if (beanDesc.getBeanClass() == Foo4777.class) {
AnnotatedWithParams dc = defaultInstantiator.getDefaultCreator();
if (!(dc instanceof AnnotatedMethod)
|| !dc.getName().equals("create")) {
Expand All @@ -51,12 +51,12 @@ public void testCreatorDetection4777() throws Exception {
@Override
public void setupModule(SetupContext context) {
super.setupModule(context);
context.addValueInstantiators(new Instantiators());
context.addValueInstantiators(new Instantiators4777());
}
};
ObjectMapper mapper = JsonMapper.builder().addModule(sm).build();

Foo result = mapper.readValue("{}", Foo.class);
Foo4777 result = mapper.readValue("{}", Foo4777.class);
assertNotNull(result);
}
}

0 comments on commit 92364f2

Please sign in to comment.