diff src/solaris/native/java/net/net_util_md.c @ 6685:95eeca6dc691

8015743: Address internet addresses Summary: moved Inet6Address fields to holder class Reviewed-by: chegar, alanb, skoivu, khazra
author michaelm
date Wed, 03 Jul 2013 17:54:38 +0100
parents eefd9678efbd
children b5326675e374 e935cd4139c6
line wrap: on
line diff
--- a/src/solaris/native/java/net/net_util_md.c	Tue Jul 02 15:17:25 2013 -0700
+++ b/src/solaris/native/java/net/net_util_md.c	Wed Jul 03 17:54:38 2013 +0100
@@ -823,7 +823,6 @@
     /* needs work. 1. family 2. clean up him6 etc deallocate memory */
     if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) {
         struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)him;
-        jbyteArray ipaddress;
         jbyte caddr[16];
         jint address;
 
@@ -844,8 +843,7 @@
                 caddr[15] = (address & 0xff);
             }
         } else {
-            ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID);
-            (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr);
+            getInet6Address_ipaddress(env, iaObj, (char *)caddr);
         }
         memset((char *)him6, 0, sizeof(struct sockaddr_in6));
         him6->sin6_port = htons(port);
@@ -882,7 +880,7 @@
                  */
                 if (!cached_scope_id) {
                     if (ia6_scopeidID) {
-                        scope_id = (int)(*env)->GetIntField(env,iaObj,ia6_scopeidID);
+                        scope_id = getInet6Address_scopeid(env, iaObj);
                     }
                     if (scope_id != 0) {
                         /* check user-specified value for loopback case
@@ -928,7 +926,7 @@
 
         if (family != IPv4) {
             if (ia6_scopeidID) {
-                him6->sin6_scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_scopeidID);
+                him6->sin6_scope_id = getInet6Address_scopeid(env, iaObj);
             }
         }
 #endif