Skip to content

Commit 5041562

Browse files
committed
Fix reflection on stringToObject
1 parent dcf727c commit 5041562

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/main/java/com/diffplug/spotless/yaml/YamlJacksonStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ FormatterFunc toFormatter() {
132132
private String format(Object objectMapper, Method stringToObject, Method objectToString, String s)
133133
throws IllegalAccessException, IllegalArgumentException {
134134
try {
135-
Object parsed = stringToObject.invoke(s, Object.class);
135+
Object parsed = stringToObject.invoke(objectMapper, s, Object.class);
136136
return (String) objectToString.invoke(objectMapper, parsed);
137137
} catch (InvocationTargetException ex) {
138138
throw new AssertionError("Unable to format YAML", ex.getCause());

0 commit comments

Comments
 (0)