diff options
Diffstat (limited to 'libjava/gnu/java')
-rw-r--r-- | libjava/gnu/java/beans/BeanInfoEmbryo.java | 19 | ||||
-rw-r--r-- | libjava/gnu/java/beans/editors/NativeBooleanEditor.java | 11 |
2 files changed, 17 insertions, 13 deletions
diff --git a/libjava/gnu/java/beans/BeanInfoEmbryo.java b/libjava/gnu/java/beans/BeanInfoEmbryo.java index 4aed20b..473aa79 100644 --- a/libjava/gnu/java/beans/BeanInfoEmbryo.java +++ b/libjava/gnu/java/beans/BeanInfoEmbryo.java @@ -1,5 +1,5 @@ /* gnu.java.beans.BeanInfoEmbryo - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -130,14 +130,15 @@ public class BeanInfoEmbryo { } public boolean hasMethod(MethodDescriptor m) { - for(int i=0;i<methods.size();i++) { - Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod(); - if(m.getMethod().getName().equals(thisMethod.getName()) - && ArrayHelper.equalsArray(m.getMethod().getParameterTypes(), thisMethod.getParameterTypes())) { - return true; - } - } - return false; + for(int i=0;i<methods.size();i++) { + Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod(); + if(m.getMethod().getName().equals(thisMethod.getName()) + && Arrays.equals(m.getMethod().getParameterTypes(), + thisMethod.getParameterTypes())) { + return true; + } + } + return false; } public void addMethod(MethodDescriptor m) { methods.addElement(m); diff --git a/libjava/gnu/java/beans/editors/NativeBooleanEditor.java b/libjava/gnu/java/beans/editors/NativeBooleanEditor.java index 1ba8beb..9fb1438 100644 --- a/libjava/gnu/java/beans/editors/NativeBooleanEditor.java +++ b/libjava/gnu/java/beans/editors/NativeBooleanEditor.java @@ -1,5 +1,5 @@ /* gnu.java.beans.editors.NativeBooleanEditor - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,12 +54,15 @@ import java.beans.*; public class NativeBooleanEditor extends PropertyEditorSupport { String[] tags = {"true","false"}; - /** setAsText for boolean checks for true or false or t or f. "" also means false. **/ + /** + * setAsText for boolean checks for true or false or t or f. + * "" also means false. + **/ public void setAsText(String val) throws IllegalArgumentException { if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) { - setValue(Boolean.FALSE); - } else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) { setValue(Boolean.TRUE); + } else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) { + setValue(Boolean.FALSE); } else { throw new IllegalArgumentException("Value must be true, false, t, f or empty."); } |