Hide AbstractIdentifier.getValue() 80/82980/10
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 9 Jul 2019 20:27:30 +0000 (22:27 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 28 Aug 2019 14:21:34 +0000 (14:21 +0000)
AbstractIdentifier is a utility wrapper class, hence it should not
have a public surface users should be interested it. Anybody relying
on .getValue() who is not a subclass should expose a domain-specific
getter method.

Change-Id: I64af4b385055d92c6499d62879c77e77216d4b39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
common/util/src/main/java/org/opendaylight/yangtools/util/AbstractIdentifier.java

index 408afcb976ffefd8859e0e1d45f6c2dee80d415b..93c2da99b580b4a78dc013086158ded5bf09547d 100644 (file)
@@ -30,7 +30,7 @@ public abstract class AbstractIdentifier<T> implements Identifier {
         this.value = requireNonNull(value);
     }
 
-    public final @NonNull T getValue() {
+    protected final @NonNull T getValue() {
         return value;
     }