You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/06/21 13:38:30 UTC

[jira] Closed: (HARMONY-486) The method ...beans.Command::getMethodName() processes "class" tag incorrectly

     [ http://issues.apache.org/jira/browse/HARMONY-486?page=all ]
     
Tim Ellison closed HARMONY-486:
-------------------------------


No response from raiser, assuming ok.


> 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
>     Assignee: Tim Ellison
>     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