Re-merge with Classpath, from Brian Jones:
* java/lang/Integer.java (getInteger): Attempt to decode the value of the system property instead of the name of the system property. (parseInt): Throw NumberFormatException explicitly in the case of a null argument in keeping with JDK 1.3. From-SVN: r47095
This commit is contained in:
parent
08f3a861a0
commit
54b6b24152
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2001-11-16 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
Re-merge with Classpath, from Brian Jones:
|
||||
* java/lang/Integer.java (getInteger): Attempt to decode the value
|
||||
of the system property instead of the name of the system property.
|
||||
(parseInt): Throw NumberFormatException explicitly in the case of
|
||||
a null argument in keeping with JDK 1.3.
|
||||
|
||||
2001-11-16 Mark Wielaard <mark@klomp.org>
|
||||
|
||||
* java/util/Timer.java (TaskQueue.isStopped): Remove method.
|
||||
|
|
|
@ -176,7 +176,7 @@ public final class Integer extends Number implements Comparable
|
|||
if (val == null) return def;
|
||||
try
|
||||
{
|
||||
return decode(nm);
|
||||
return decode(val);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
|
@ -364,6 +364,9 @@ public final class Integer extends Number implements Comparable
|
|||
{
|
||||
final int len;
|
||||
|
||||
if (str == null)
|
||||
throw new NumberFormatException ();
|
||||
|
||||
if ((len = str.length()) == 0 ||
|
||||
radix < Character.MIN_RADIX || radix > Character.MAX_RADIX)
|
||||
throw new NumberFormatException();
|
||||
|
|
Loading…
Add table
Reference in a new issue