FULL PRODUCT VERSION :
$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
$ uname -a
Darwin dhcp-whq501ip-3rd-and-4th-floor-gen-off-10-213-54-150.usdhcp.oraclecorp.com 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
In src/solaris/native/java/net/Inet6AddressImpl.c, in the MACOSX-only method lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6), there are the local variable declarations
166 int familyOrder = 0;
167 int count = 0;
but neither of those local variables is used in the body of the method.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look at the source code, e.g., http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/48143da4c15d/src/solaris/native/java/net/Inet6AddressImpl.c lines 166 and 167
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would not expect to see unused variable declarations.
ACTUAL -
The variables were declared, but unused.
REPRODUCIBILITY :
This bug can be reproduced always.
$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
$ uname -a
Darwin dhcp-whq501ip-3rd-and-4th-floor-gen-off-10-213-54-150.usdhcp.oraclecorp.com 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
In src/solaris/native/java/net/Inet6AddressImpl.c, in the MACOSX-only method lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6), there are the local variable declarations
166 int familyOrder = 0;
167 int count = 0;
but neither of those local variables is used in the body of the method.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look at the source code, e.g., http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/48143da4c15d/src/solaris/native/java/net/Inet6AddressImpl.c lines 166 and 167
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would not expect to see unused variable declarations.
ACTUAL -
The variables were declared, but unused.
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-8289768 Clean up unused code
-
- Resolved
-