Skip to content

Commit

Permalink
8205076: [17u] Inet6AddressImpl.c: lookupIfLocalHost accesses `int …
Browse files Browse the repository at this point in the history
…InetAddress.preferIPv6Address` as a boolean

Backport-of: 3eb15b02b5efeb065ada8c6ae2bc8718e7892deb
  • Loading branch information
shipilev committed Jun 17, 2024
1 parent 7d4ef49 commit 667bbd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java.base/unix/native/libnet/Inet6AddressImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6)
result = (*env)->NewObjectArray(env, arraySize, ia_class, NULL);
if (!result) goto done;

if ((*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID)) {
if ((*env)->GetStaticIntField(env, ia_class, ia_preferIPv6AddressID) == java_net_InetAddress_PREFER_IPV6_VALUE) {
i = includeLoopback ? addrs6 : (addrs6 - numV6Loopbacks);
j = 0;
} else {
Expand Down

1 comment on commit 667bbd3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.