From ed228dae598afb8837cc24463365b836f6eeafae Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Mon, 25 Jun 2018 18:09:22 -0400 Subject: [PATCH] polishing --- .../cloud/stream/config/MergableProperties.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/MergableProperties.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/MergableProperties.java index 79c64c3b2..793256f6b 100644 --- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/MergableProperties.java +++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/MergableProperties.java @@ -47,6 +47,9 @@ public interface MergableProperties { * - If source property is mergable then merge. */ default void merge(MergableProperties mergable) { + if (mergable == null) { + return; + } for (PropertyDescriptor targetPd : BeanUtils.getPropertyDescriptors(mergable.getClass())) { Method writeMethod = targetPd.getWriteMethod(); if (writeMethod != null) { @@ -62,6 +65,7 @@ public interface MergableProperties { Object value = readMethod.invoke(this); if (value != null) { if (value instanceof MergableProperties) { + Object m = readMethod.invoke(mergable); ((MergableProperties)value).merge((MergableProperties)readMethod.invoke(mergable)); } else {