Skip to content

Commit fda4927

Browse files
committed
Remove MapperConfig argument from BeanDescription.supplier()
1 parent 631b916 commit fda4927

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/main/java/tools/jackson/databind/BeanDescription.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ protected BeanDescription(JavaType type) {
3535
_type = type;
3636
}
3737

38-
public BeanDescription.Supplier supplier(MapperConfig<?> config) {
39-
return new EagerSupplier(config, this);
40-
}
38+
/**
39+
* Method for constructing a supplier for this bean description instance:
40+
* sometimes needed when code expects supplier, not description instance.
41+
*/
42+
public abstract BeanDescription.Supplier supplier();
4143

4244
/*
4345
/**********************************************************************

src/main/java/tools/jackson/databind/introspect/BasicBeanDescription.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.fasterxml.jackson.annotation.JsonInclude;
88

99
import tools.jackson.databind.*;
10+
import tools.jackson.databind.BeanDescription.EagerSupplier;
1011
import tools.jackson.databind.cfg.MapperConfig;
1112
import tools.jackson.databind.util.Annotations;
1213
import tools.jackson.databind.util.ClassUtil;
@@ -154,6 +155,11 @@ protected List<BeanPropertyDefinition> _properties() {
154155
return _properties;
155156
}
156157

158+
@Override
159+
public BeanDescription.Supplier supplier() {
160+
return new EagerSupplier(_config, this);
161+
}
162+
157163
/*
158164
/**********************************************************************
159165
/* Limited modifications by core databind functionality

0 commit comments

Comments
 (0)