Hide getRestconfStrategy() 66/107066/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 25 Jul 2023 17:23:15 +0000 (19:23 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 25 Jul 2023 20:52:44 +0000 (22:52 +0200)
This method does not touch shared state, hence it should not be
synchronized. It really is a private detail, visible for testing only.

Change-Id: I41a765a7f7aa8b5dcda6e9d57fc4f065f760fbf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfDataServiceImpl.java

index 0b19dc2ef33255a0aad0a111bff7a2cc46521e4b..a51fac23fffceeb0a421471567a370abf467e0c0 100644 (file)
@@ -282,8 +282,8 @@ public class RestconfDataServiceImpl implements RestconfDataService {
         return PlainPatchDataTransactionUtil.patchData(payload, strategy, iid.getSchemaContext());
     }
 
-    // FIXME: why is this synchronized?
-    public synchronized RestconfStrategy getRestconfStrategy(final DOMMountPoint mountPoint) {
+    @VisibleForTesting
+    final RestconfStrategy getRestconfStrategy(final DOMMountPoint mountPoint) {
         if (mountPoint == null) {
             return restconfStrategy;
         }