This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
new 7b095ab [KARAF-6949] Avoid potential NPE in HTTP ProxyServiceImpl
7b095ab is described below
commit 7b095abba7c86c8e5b539a8ed64cb334c5ba1311
Author: jbonofre <[email protected]>
AuthorDate: Mon Dec 14 08:05:22 2020 +0100
[KARAF-6949] Avoid potential NPE in HTTP ProxyServiceImpl
(cherry picked from commit 057e121986360b16c864421c0a9fc6462654abf2)
---
.../java/org/apache/karaf/http/core/internal/ProxyServiceImpl.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/http/src/main/java/org/apache/karaf/http/core/internal/ProxyServiceImpl.java
b/http/src/main/java/org/apache/karaf/http/core/internal/ProxyServiceImpl.java
index 783c4b8..9463b25 100644
---
a/http/src/main/java/org/apache/karaf/http/core/internal/ProxyServiceImpl.java
+++
b/http/src/main/java/org/apache/karaf/http/core/internal/ProxyServiceImpl.java
@@ -48,8 +48,10 @@ public class ProxyServiceImpl implements ProxyService {
this.bundleContext = bundleContext;
this.proxies = new HashMap<>();
try {
- Configuration configuration =
configurationAdmin.getConfiguration(CONFIGURATION_PID);
- update(configuration.getProperties());
+ Configuration configuration =
configurationAdmin.getConfiguration(CONFIGURATION_PID, null);
+ if (configuration != null) {
+ update(configuration.getProcessedProperties(null));
+ }
} catch (Exception e) {
LOG.error("Can't load proxies", e);
}