harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-486) The method ...beans.Command::getMethodName() processes "class" tag incorrectly
Date Mon, 22 May 2006 13:08:29 GMT
The method ...beans.Command::getMethodName() processes "class" tag incorrectly
------------------------------------------------------------------------------

         Key: HARMONY-486
         URL: http://issues.apache.org/jira/browse/HARMONY-486
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Mikhail Fursov
    Priority: Trivial


The class 'org.apache.harmony.beans.Command' in method 'getMethodName' contains the duplicate
if clauses:

here->  if(isTag("class")) {
                addArgument(new Argument(String.class, data), 0);
                methodValue = "forName";
            } else if(isPrimitive()) {
                if(isTag("char")) {
                    if(data.length() != 1) {
                        throw new IntrospectionException("Cannot convert" + data
                                + " to char");
                    } else {
                        addArgument(new Argument(char.class, new Character(
                                data.charAt(0))), 0);
                    }
                } else {
                    addArgument(new Argument(String.class, data), 0);
                }
                methodValue = "new";
            } else if(isConstructor() || hasAttr("method", "new")) {
                methodValue = "new";
            } else if(isArray()) {
                methodValue = "new";
                int length = hasAttr("length") ? Integer.parseInt(
                        getAttr("length")) : getArgumentsNumber();
                copyArgumentsToCommands();
                addArgument(new Argument(int.class, new Integer(length)), 0);
here-> } else if(isTag("class")) {
                methodValue = "forName";
    

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message