pull/37018/head
Phillip Webb 1 year ago
parent 9b72cc41ab
commit 0fd1c89889

@ -392,11 +392,9 @@ class JavaBeanBinder implements DataObjectBinder {
} }
private boolean isUninitializedKotlinProperty(Exception ex) { private boolean isUninitializedKotlinProperty(Exception ex) {
if (ex instanceof InvocationTargetException ite) { return (ex instanceof InvocationTargetException invocationTargetException)
return "kotlin.UninitializedPropertyAccessException" && "kotlin.UninitializedPropertyAccessException"
.equals(ite.getTargetException().getClass().getName()); .equals(invocationTargetException.getTargetException().getClass().getName());
}
return false;
} }
boolean isSettable() { boolean isSettable() {

@ -16,6 +16,7 @@
package org.springframework.boot.image.assertions; package org.springframework.boot.image.assertions;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -106,8 +107,14 @@ public class ContainerConfigAssert extends AbstractAssert<ContainerConfigAssert,
return this.actual.extractingJsonPathArrayValue("$.processes[?(@.type=='%s')]", type) return this.actual.extractingJsonPathArrayValue("$.processes[?(@.type=='%s')]", type)
.singleElement() .singleElement()
.extracting("command", "args") .extracting("command", "args")
.flatMap((list) -> (list != null) ? ((List<?>) list).stream().map(Objects::toString).toList() .flatMap(this::getArgs);
: Collections.emptyList()); }
private Collection<String> getArgs(Object obj) {
if (obj instanceof List<?> list) {
return list.stream().map(Objects::toString).toList();
}
return Collections.emptyList();
} }
} }

Loading…
Cancel
Save