Skip to content

Commit 7252207

Browse files
committed
Merge branch '2.x' into 3.x
2 parents b50c7b4 + 4191c27 commit 7252207

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public final Object findInjectableValue(Object valueId,
483483
"No 'injectableValues' configured, cannot inject value with id '%s'", valueId),
484484
valueId, forProperty, beanInstance);
485485
}
486-
return _injectableValues.findInjectableValue(valueId, this, forProperty, beanInstance, optional);
486+
return _injectableValues.findInjectableValue(this, valueId, forProperty, beanInstance, optional);
487487
}
488488

489489
/**

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ public abstract class InjectableValues
1919
* (will be available when injected via field or setter; not available
2020
* when injected via constructor or factory method argument).
2121
*
22+
* @param ctxt Deserialization context
2223
* @param valueId Object that identifies value to inject; may be a simple
2324
* name or more complex identifier object, whatever provider needs
24-
* @param ctxt Deserialization context
2525
* @param forProperty Bean property in which value is to be injected
2626
* @param beanInstance Bean instance that contains property to inject,
2727
* if available; null if bean has not yet been constructed.
2828
* @param optional Flag used for configuring the behavior when the value
2929
* to inject is not found
3030
*/
31-
public abstract Object findInjectableValue(Object valueId, DeserializationContext ctxt,
31+
public abstract Object findInjectableValue(DeserializationContext ctxt,
32+
Object valueId,
3233
BeanProperty forProperty, Object beanInstance, Boolean optional);
3334

3435
/*
@@ -76,7 +77,8 @@ public Std snapshot() {
7677
}
7778

7879
@Override
79-
public Object findInjectableValue(Object valueId, DeserializationContext ctxt,
80+
public Object findInjectableValue(DeserializationContext ctxt,
81+
Object valueId,
8082
BeanProperty forProperty, Object beanInstance, Boolean optional)
8183
{
8284
if (!(valueId instanceof String)) {

src/test/java/tools/jackson/databind/introspect/IntrospectorPairTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ public JacksonInject.Value findInjectableValue(MapperConfig<?> config,
672672

673673
static class TestInjector extends InjectableValues {
674674
@Override
675-
public Object findInjectableValue(Object valueId, DeserializationContext ctxt,
675+
public Object findInjectableValue(DeserializationContext ctxt,
676+
Object valueId,
676677
BeanProperty forProperty, Object beanInstance, Boolean optional) {
677678
if (valueId == "jjj") {
678679
UnreadableBean bean = new UnreadableBean();

src/test/java/tools/jackson/databind/tofix/JacksonInject4218Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ class MyInjectableValues extends InjectableValues.Std
3636

3737
@Override
3838
public Object findInjectableValue(
39-
Object valueId,
4039
DeserializationContext ctxt,
40+
Object valueId,
4141
BeanProperty forProperty,
4242
Object beanInstance,
4343
Boolean optional
4444
) {
4545
if (valueId.equals("id")) {
4646
return "id" + nextId++;
4747
} else {
48-
return super.findInjectableValue(valueId, ctxt, forProperty, beanInstance, optional);
48+
return super.findInjectableValue(ctxt, valueId, forProperty, beanInstance, optional);
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)