@@ -2075,30 +2075,30 @@ protected void convertNumberToInt() throws IOException
2075
2075
// Let's verify it's lossless conversion by simple roundtrip
2076
2076
int result = (int ) _numberLong ;
2077
2077
if (((long ) result ) != _numberLong ) {
2078
- _reportError ( "Numeric value (" + getText ()+ ") out of range of int" );
2078
+ reportOverflowInt ( String . valueOf ( _numberLong ) );
2079
2079
}
2080
2080
_numberInt = result ;
2081
2081
} else if ((_numTypesValid & NR_BIGINT ) != 0 ) {
2082
2082
if (BI_MIN_INT .compareTo (_numberBigInt ) > 0
2083
2083
|| BI_MAX_INT .compareTo (_numberBigInt ) < 0 ) {
2084
- reportOverflowInt ();
2084
+ reportOverflowInt (String . valueOf ( _numberBigInt ) );
2085
2085
}
2086
2086
_numberInt = _numberBigInt .intValue ();
2087
2087
} else if ((_numTypesValid & NR_DOUBLE ) != 0 ) {
2088
2088
// Need to check boundaries
2089
2089
if (_numberDouble < MIN_INT_D || _numberDouble > MAX_INT_D ) {
2090
- reportOverflowInt ();
2090
+ reportOverflowInt (String . valueOf ( _numberDouble ) );
2091
2091
}
2092
2092
_numberInt = (int ) _numberDouble ;
2093
2093
} else if ((_numTypesValid & NR_FLOAT ) != 0 ) {
2094
2094
if (_numberFloat < MIN_INT_D || _numberFloat > MAX_INT_D ) {
2095
- reportOverflowInt ();
2095
+ reportOverflowInt (String . valueOf ( _numberFloat ) );
2096
2096
}
2097
2097
_numberInt = (int ) _numberFloat ;
2098
2098
} else if ((_numTypesValid & NR_BIGDECIMAL ) != 0 ) {
2099
2099
if (BD_MIN_INT .compareTo (_numberBigDecimal ) > 0
2100
2100
|| BD_MAX_INT .compareTo (_numberBigDecimal ) < 0 ) {
2101
- reportOverflowInt ();
2101
+ reportOverflowInt (String . valueOf ( _numberBigDecimal ) );
2102
2102
}
2103
2103
_numberInt = _numberBigDecimal .intValue ();
2104
2104
} else {
@@ -2114,23 +2114,23 @@ protected void convertNumberToLong() throws IOException
2114
2114
} else if ((_numTypesValid & NR_BIGINT ) != 0 ) {
2115
2115
if (BI_MIN_LONG .compareTo (_numberBigInt ) > 0
2116
2116
|| BI_MAX_LONG .compareTo (_numberBigInt ) < 0 ) {
2117
- reportOverflowLong ();
2117
+ reportOverflowLong (String . valueOf ( _numberBigInt ) );
2118
2118
}
2119
2119
_numberLong = _numberBigInt .longValue ();
2120
2120
} else if ((_numTypesValid & NR_DOUBLE ) != 0 ) {
2121
2121
if (_numberDouble < MIN_LONG_D || _numberDouble > MAX_LONG_D ) {
2122
- reportOverflowLong ();
2122
+ reportOverflowLong (String . valueOf ( _numberDouble ) );
2123
2123
}
2124
2124
_numberLong = (long ) _numberDouble ;
2125
2125
} else if ((_numTypesValid & NR_FLOAT ) != 0 ) {
2126
2126
if (_numberFloat < MIN_LONG_D || _numberFloat > MAX_LONG_D ) {
2127
- reportOverflowInt ( );
2127
+ reportOverflowLong ( String . valueOf ( _numberFloat ) );
2128
2128
}
2129
2129
_numberLong = (long ) _numberFloat ;
2130
2130
} else if ((_numTypesValid & NR_BIGDECIMAL ) != 0 ) {
2131
2131
if (BD_MIN_LONG .compareTo (_numberBigDecimal ) > 0
2132
2132
|| BD_MAX_LONG .compareTo (_numberBigDecimal ) < 0 ) {
2133
- reportOverflowLong ();
2133
+ reportOverflowLong (String . valueOf ( _numberBigDecimal ) );
2134
2134
}
2135
2135
_numberLong = _numberBigDecimal .longValue ();
2136
2136
} else {
0 commit comments