db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2392) Create verbose option to get the queries which are currently running
Date Wed, 07 Mar 2007 22:50:24 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478943
] 

Andrew McIntyre commented on DERBY-2392:
----------------------------------------

Hi Manjula,

There is a problem with the way that you are parsing the arguments passed in on the command-line,
specifically this block:

if(args.length>0){
    if(args[1].equalsIgnoreCase("-verbose"))
	verbose=true;
}

This code will lead to an ArrayIndexOutOfBoundsException if only one argument is given on
the command-line.

A better way to parse the arguments would be to iterate over the args array with a for loop
and for each element of the array, call a method that parses the argument and sets the appropriate
settings. That way, only the number of arguments that have been passed in are considered,
and the order of the arguments does not matter.

> Create verbose option to get the queries which are currently running
> --------------------------------------------------------------------
>
>                 Key: DERBY-2392
>                 URL: https://issues.apache.org/jira/browse/DERBY-2392
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>         Attachments: DERBY-2392_diff_ver1.txt, DERBY-2392_stat_ver1.txt
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message