diff options
Diffstat (limited to 'gnu/java/beans/decoder/ArrayHandler.java')
-rw-r--r-- | gnu/java/beans/decoder/ArrayHandler.java | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/gnu/java/beans/decoder/ArrayHandler.java b/gnu/java/beans/decoder/ArrayHandler.java index 23f028519..28930f519 100644 --- a/gnu/java/beans/decoder/ArrayHandler.java +++ b/gnu/java/beans/decoder/ArrayHandler.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -86,31 +86,31 @@ class ArrayHandler extends AbstractElementHandler if (className != null) { - try - { - Class klass; - - if (typeMap.containsKey(className)) - klass = (Class) typeMap.get(className); - else - klass = instantiateClass(className); - - String length = attributes.getValue("length"); - if (length != null) - // creates Array with predefined length - return new ArrayContext(id, klass, Integer.parseInt(length)); - else - // creates Array without length restriction - return new GrowableArrayContext(id, klass); - } - catch (ClassNotFoundException cnfe) - { - throw new AssemblyException(cnfe); - } - catch (NumberFormatException nfe) - { - throw new AssemblyException(nfe); - } + try + { + Class klass; + + if (typeMap.containsKey(className)) + klass = (Class) typeMap.get(className); + else + klass = instantiateClass(className); + + String length = attributes.getValue("length"); + if (length != null) + // creates Array with predefined length + return new ArrayContext(id, klass, Integer.parseInt(length)); + else + // creates Array without length restriction + return new GrowableArrayContext(id, klass); + } + catch (ClassNotFoundException cnfe) + { + throw new AssemblyException(cnfe); + } + catch (NumberFormatException nfe) + { + throw new AssemblyException(nfe); + } } throw new AssemblyException(new IllegalArgumentException("Missing 'class' attribute in <array> tag.")); |