Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

import org.apache.commons.logging.Log;
Expand Down Expand Up @@ -139,7 +140,7 @@ private Map<String, Object> changes(Map<String, Object> before, Map<String, Obje
if (!after.containsKey(key)) {
result.put(key, null);
}
else if (!equal(before.get(key), after.get(key))) {
else if (!Objects.equals(before.get(key), after.get(key))) {
result.put(key, after.get(key));
}
}
Expand All @@ -151,16 +152,6 @@ else if (!equal(before.get(key), after.get(key))) {
return result;
}

private boolean equal(Object one, Object two) {
if (one == null && two == null) {
return true;
}
if (one == null || two == null) {
return false;
}
return one.equals(two);
}

private Map<String, Object> extract(MutablePropertySources propertySources) {
Map<String, Object> result = new HashMap<>();
List<PropertySource<?>> sources = new ArrayList<>();
Expand Down
Loading