/[classpath]/classpath/java/lang/reflect/Array.java
ViewVC logotype

Diff of /classpath/java/lang/reflect/Array.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by mark, Tue Jan 22 22:27:00 2002 UTC revision 1.9 by mark, Tue Sep 9 22:19:33 2003 UTC
# Line 1  Line 1 
1  /* java.lang.reflect.Array - manipulate arrays by reflection  /* java.lang.reflect.Array - manipulate arrays by reflection
2     Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.     Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 431  public final class Array Line 431  public final class Array
431    {    {
432      if (array instanceof Object[])      if (array instanceof Object[])
433        {        {
434          // Too bad Sun won't let us throw the easier ArrayStoreException!          // Too bad the API won't let us throw the easier ArrayStoreException!
435          if (! array.getClass().getComponentType().isInstance(value))          if (value != null
436            throw new IllegalArgumentException();              && ! array.getClass().getComponentType().isInstance(value))
437          ((Object[]) array)[index] = value;            throw new IllegalArgumentException();
438            ((Object[]) array)[index] = value;
439        }        }
440      else if (value instanceof Boolean)      else if (value instanceof Boolean)
441        setBoolean(array, index, ((Boolean) value).booleanValue());        setBoolean(array, index, ((Boolean) value).booleanValue());

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26