Skip to content

Commit

Permalink
fix setting null value of property in xml throws NullPointerException (
Browse files Browse the repository at this point in the history
…apolloconfig#2646)

* fix setting value of property in xml is null throws NullPointerException

* fix setting null value of property in xml throws NullPointerException
  • Loading branch information
xuanuu authored and JaredTan95 committed Oct 13, 2019
1 parent 59d92f6 commit 9c871e4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.google.common.collect.Sets;
import java.util.Set;
import java.util.Stack;
import java.util.Objects;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanExpressionContext;
Expand Down Expand Up @@ -65,7 +66,7 @@ private Object evaluateBeanDefinitionString(ConfigurableBeanFactory beanFactory,
public Set<String> extractPlaceholderKeys(String propertyString) {
Set<String> placeholderKeys = Sets.newHashSet();

if (!isNormalizedPlaceholder(propertyString) && !isExpressionWithPlaceholder(propertyString)) {
if (Objects.isNull(propertyString) || (!isNormalizedPlaceholder(propertyString) && !isExpressionWithPlaceholder(propertyString))) {
return placeholderKeys;
}

Expand Down

0 comments on commit 9c871e4

Please sign in to comment.