Expose Ipv{4,6}Util 74/105974/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 15 May 2023 21:38:21 +0000 (23:38 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 16 May 2023 01:01:36 +0000 (03:01 +0200)
These two utility classes form the common interface, expose them to
outside world.

JIRA: MDSAL-826
Change-Id: Iee050241e6ca52ae52c2f70abaecdd9077c6a400
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/ietf/ietf-type-util/src/main/java/org/opendaylight/mdsal/model/ietf/util/Ipv4Utils.java
model/ietf/ietf-type-util/src/main/java/org/opendaylight/mdsal/model/ietf/util/Ipv6Utils.java

index 607c423ca1b3027081f4ed5ebd6ecbf0b642ea12..77da3db8dbdda24ee7e0832f6c27f840a4c302a4 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.mdsal.model.ietf.util;
 
+import com.google.common.annotations.Beta;
 import org.eclipse.jdt.annotation.NonNull;
 
 /**
@@ -14,9 +15,10 @@ import org.eclipse.jdt.annotation.NonNull;
  * exposed in any shape or form to the outside world, as the code relies on the fact that the strings presented to it
  * have been previously validated to conform to the regular expressions defined in the YANG model.
  */
-final class Ipv4Utils {
+@Beta
+public final class Ipv4Utils {
     private Ipv4Utils() {
-
+        // Hidden on purpose
     }
 
     static void fillIpv4Bytes(final byte @NonNull[] bytes, final int byteStart, final String str, final int strStart,
index f2ba8c82f01f3271682aaddf20d63b6506526cb2..eb150b389182b505a268fb032b7b4977aa3607fa 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.mdsal.model.ietf.util;
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Verify.verify;
 
+import com.google.common.annotations.Beta;
 import java.util.Arrays;
 import java.util.HexFormat;
 import org.eclipse.jdt.annotation.NonNull;
@@ -44,13 +45,14 @@ import org.eclipse.jdt.annotation.NonNull;
  * As far as why it is similar to Sun's sun.net.util please ask Sun why
  * their code has the same variable names, comments and code flow.
  */
-final class Ipv6Utils {
+@Beta
+public final class Ipv6Utils {
     private static final int INADDR4SZ = 4;
     private static final int INADDR6SZ = 16;
     private static final int INT16SZ = Short.BYTES;
 
     private Ipv6Utils() {
-
+        // Hidden on purpose
     }
 
     /**