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

sseifert pushed a commit to branch experimental/WTES-69-diagnosis
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 7fecb75405d48bcfddd8300572258c350dcf4e77
Author: Stefan Seifert <[email protected]>
AuthorDate: Mon Dec 6 22:19:07 2021 +0100

    do not call getService in debug logging
---
 .../main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java | 2 +-
 .../org/apache/sling/testing/mock/osgi/MockServiceRegistration.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java 
b/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java
index f2b5e41..376e492 100644
--- 
a/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java
+++ 
b/core/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java
@@ -205,7 +205,7 @@ class MockBundleContext implements BundleContext {
 
     void unregisterService(MockServiceRegistration<?> registration) {
         if (log.isDebugEnabled()) {
-            Object componentInstance = registration.getService();
+            Object componentInstance = registration.service;
             log.debug("Unregister {} ({}), bundleContext={}", 
componentInstance != null ? componentInstance.getClass() : "",
                     StringUtils.join(registration.getClasses(), ","), this);
         }
diff --git 
a/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
 
b/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
index 08b7ba9..2294611 100644
--- 
a/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
+++ 
b/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
@@ -46,7 +46,7 @@ class MockServiceRegistration<T> implements 
ServiceRegistration<T>, Comparable<M
 
     private final Long serviceId;
     private final Set<String> clazzes;
-    private final T service;
+    final T service;
     private final Hashtable<String, Object> properties;
     private final ServiceReference<T> serviceReference;
     private final MockBundleContext bundleContext;

Reply via email to