FULL PRODUCT VERSION :
Exists in jdk8, jdk8u, and jdk9
openjdk version "1.8.0_77"
OpenJDK Runtime Environment (build 1.8.0_77-b03)
OpenJDK 64-Bit Server VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
All OSes.
Example: Linux godwit.cs.washington.edu 4.4.6-200.fc22.x86_64 #1 SMP Wed Mar 16 22:13:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
All configurations. Problem is in source code.
A DESCRIPTION OF THE PROBLEM :
In the Javadoc for java.lang.Integer.formatUnsignedInt(), "a long" should be "an int".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Source code error, no steps needed to reproduce.
View the Javadoc for the method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
You should see "an int".
ACTUAL -
You will see "a long", which is incorrect.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Apply the following patch:
--- /homes/gws/mernst/java/jdk-openjdk8/src/share/classes/java/lang/Integer.java 2014-01-01 21:03:36.989474867 -0800
+++ - 2016-04-12 16:38:00.321864615 -0700
@@ -319,7 +319,7 @@
}
/**
- * Format a long (treated as unsigned) into a character buffer.
+ * Format an int (treated as unsigned) into a character buffer.
* @param val the unsigned int to format
* @param shift the log2 of the base to format in (4 for hex, 3 for octal, 1 for binary)
* @param buf the character buffer to write to
Exists in jdk8, jdk8u, and jdk9
openjdk version "1.8.0_77"
OpenJDK Runtime Environment (build 1.8.0_77-b03)
OpenJDK 64-Bit Server VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
All OSes.
Example: Linux godwit.cs.washington.edu 4.4.6-200.fc22.x86_64 #1 SMP Wed Mar 16 22:13:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
All configurations. Problem is in source code.
A DESCRIPTION OF THE PROBLEM :
In the Javadoc for java.lang.Integer.formatUnsignedInt(), "a long" should be "an int".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Source code error, no steps needed to reproduce.
View the Javadoc for the method.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
You should see "an int".
ACTUAL -
You will see "a long", which is incorrect.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Apply the following patch:
--- /homes/gws/mernst/java/jdk-openjdk8/src/share/classes/java/lang/Integer.java 2014-01-01 21:03:36.989474867 -0800
+++ - 2016-04-12 16:38:00.321864615 -0700
@@ -319,7 +319,7 @@
}
/**
- * Format a long (treated as unsigned) into a character buffer.
+ * Format an int (treated as unsigned) into a character buffer.
* @param val the unsigned int to format
* @param shift the log2 of the base to format in (4 for hex, 3 for octal, 1 for binary)
* @param buf the character buffer to write to
- relates to
-
JDK-8050114 Expose Integer/Long formatUnsigned methods internally
-
- Closed
-