BUG-2825: Cleanup comments
[mdsal.git] / model / ietf / ietf-type-util / src / main / java / org / opendaylight / mdsal / model / ietf / util / Ipv6Utils.java
index 6672600dc1f5448c02f79158606b482b737956c9..ce35e413497987f32c2d19d8a17d1228be1728d1 100644 (file)
@@ -61,7 +61,7 @@ final class Ipv6Utils {
        final int percentPos = addrStr.indexOf('%');
        final int addrStrLen = percentPos == -1 ? addrStr.length() : percentPos;
 
-       /* Leading :: requires some special handling. */
+       // Leading :: requires some special handling.
        int i = 0;
        if (addrStr.charAt(i) == ':') {
            // Note ++i side-effect in check
@@ -78,16 +78,16 @@ final class Ipv6Utils {
        while (i < addrStrLen) {
            final char ch = addrStr.charAt(i++);
 
-           /* v6 separator */
+           // v6 separator
            if (ch == ':') {
                curtok = i;
                if (!saw_xdigit) {
-                   /* no need to check separator position validity - regexp does that */
+                   // no need to check separator position validity - regexp does that
                    colonp = j;
                    continue;
                }
 
-               /* removed overrun check - the regexp checks for valid data */
+               // removed overrun check - the regexp checks for valid data
 
                dst[j++] = (byte) ((val >>> 8) & 0xff);
                dst[j++] = (byte) (val & 0xff);
@@ -96,9 +96,8 @@ final class Ipv6Utils {
                continue;
            }
 
-           /* frankenstein - v4 attached to v6, mixed notation */
+           // frankenstein - v4 attached to v6, mixed notation
            if (ch == '.' && ((j + INADDR4SZ) <= INADDR6SZ)) {
-
                /*
                 * This has passed the regexp so it is fairly safe to parse it
                 * straight away. Use the Ipv4Utils for that.
@@ -109,7 +108,8 @@ final class Ipv6Utils {
                break;
            }
 
-           /* Business as usual - ipv6 address digit.
+           /*
+            * Business as usual - ipv6 address digit.
             * We can remove all checks from the original BSD code because
             * the regexp has already verified that we are not being fed
             * anything bigger than 0xffff between the separators.
@@ -130,8 +130,8 @@ final class Ipv6Utils {
 
            final int n = j - colonp;
            for (i = 1; i <= n; i++) {
-               dst[INADDR6SZ - i] = dst[colonp + n - i];
-               dst[colonp + n - i] = 0;
+               dst[INADDR6SZ - i] = dst[j - i];
+               dst[j - i] = 0;
            }
        } else {
            Verify.verify(j == INADDR6SZ, "Overrun in parsing of '%s', should not occur", addrStr);