This is an automated email from the ASF dual-hosted git repository.

amichai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-rsa.git

commit 25cbbded4faeed396176343b4c7fe02603aab7ab
Author: Amichai Rothman <[email protected]>
AuthorDate: Sun Mar 15 12:40:25 2026 +0200

    Fix potential concurrency-related NPE when updating exported service 
properties
---
 .../java/org/apache/aries/rsa/core/ExportRegistrationImpl.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/rsa/src/main/java/org/apache/aries/rsa/core/ExportRegistrationImpl.java 
b/rsa/src/main/java/org/apache/aries/rsa/core/ExportRegistrationImpl.java
index 8b66c7ce..9a722885 100644
--- a/rsa/src/main/java/org/apache/aries/rsa/core/ExportRegistrationImpl.java
+++ b/rsa/src/main/java/org/apache/aries/rsa/core/ExportRegistrationImpl.java
@@ -182,19 +182,20 @@ public class ExportRegistrationImpl implements 
ExportRegistration {
 
     @Override
     public EndpointDescription update(Map<String, ?> properties) {
-        if (getExportReference() == null) {
+        ExportReference ref = getExportReference();
+        if (ref == null) {
             return null;
         }
-        ServiceReference<?> sref = getExportReference().getExportedService();
+        ServiceReference<?> sref = ref.getExportedService();
 
         HashMap<String, Object> props = new HashMap<>(properties);
-        EndpointDescription oldEpd = 
getExportReference().getExportedEndpoint();
+        EndpointDescription oldEpd = ref.getExportedEndpoint();
         copyIfNull(props, oldEpd, RemoteConstants.ENDPOINT_ID);
         copyIfNull(props, oldEpd, RemoteConstants.SERVICE_IMPORTED_CONFIGS);
 
         EndpointDescription epd = new EndpointDescription(sref, props);
         exportReference = new ExportReferenceImpl(sref, epd);
-        this.sender.notifyUpdate(this.getExportReference());
+        this.sender.notifyUpdate(ref);
         return epd;
     }
 

Reply via email to