-
Bug
-
Resolution: Fixed
-
P2
-
8-repo-lambda
Let's consider following code:
import java.util.IntSummaryStatistics;
public class IntSummStatsTest {
public static void main(String[] asrt) {
new IntSummaryStatistics().toString();
}
}
Its running causes following output:
Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.Double
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4309)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2774)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2728)
at java.util.Formatter.format(Formatter.java:2514)
at java.util.Formatter.format(Formatter.java:2449)
at java.lang.String.format(String.java:2907)
at java.util.IntSummaryStatistics.toString(IntSummaryStatistics.java:154)
at IntSummStatsTest.main(IntSummStatsTest.java:5)
The same thing happens to LongStreamStatistics:
import java.util.LongSummaryStatistics;
public class LongSummStatsTest {
public static void main(String[] asrt) {
new LongSummaryStatistics().toString();
}
}
the code above leads to:
Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.Double
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4309)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2774)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2728)
at java.util.Formatter.format(Formatter.java:2514)
at java.util.Formatter.format(Formatter.java:2449)
at java.lang.String.format(String.java:2907)
at java.util.LongSummaryStatistics.toString(LongSummaryStatistics.java:166)
at LongSummStatsTest.main(LongSummStatsTest.java:5)
The code is attached for your convenience.
import java.util.IntSummaryStatistics;
public class IntSummStatsTest {
public static void main(String[] asrt) {
new IntSummaryStatistics().toString();
}
}
Its running causes following output:
Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.Double
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4309)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2774)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2728)
at java.util.Formatter.format(Formatter.java:2514)
at java.util.Formatter.format(Formatter.java:2449)
at java.lang.String.format(String.java:2907)
at java.util.IntSummaryStatistics.toString(IntSummaryStatistics.java:154)
at IntSummStatsTest.main(IntSummStatsTest.java:5)
The same thing happens to LongStreamStatistics:
import java.util.LongSummaryStatistics;
public class LongSummStatsTest {
public static void main(String[] asrt) {
new LongSummaryStatistics().toString();
}
}
the code above leads to:
Exception in thread "main" java.util.IllegalFormatConversionException: d != java.lang.Double
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4309)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2774)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2728)
at java.util.Formatter.format(Formatter.java:2514)
at java.util.Formatter.format(Formatter.java:2449)
at java.lang.String.format(String.java:2907)
at java.util.LongSummaryStatistics.toString(LongSummaryStatistics.java:166)
at LongSummStatsTest.main(LongSummStatsTest.java:5)
The code is attached for your convenience.
- relates to
-
JDK-8015686 toInt(Long)SummaryStatistics toString() throws IllegalFormatConversionException
- Closed