Skip to content

Commit d3874eb

Browse files
committed
minor improvement to error detection wrt creator property index (for deser)
1 parent 23a7332 commit d3874eb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/SettableBeanProperty.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,13 @@ public boolean visibleInView(Class<?> activeView) {
408408
*
409409
* @since 2.1
410410
*/
411-
public int getCreatorIndex() { return -1; }
412-
411+
public int getCreatorIndex() {
412+
// changed from 'return -1' in 2.7.9 / 2.8.7
413+
throw new IllegalStateException(String.format(
414+
"Internal error: no creator index for property '%s' (of type %s)",
415+
this.getName(), getClass().getName()));
416+
}
417+
413418
/**
414419
* Accessor for id of injectable value, if this bean property supports
415420
* value injection.

0 commit comments

Comments
 (0)