mirror of https://github.com/dspinellis/UMLGraph
Added a check for option length, to avoid ArrayOutOfBoundExceptions if the users specifies an option without its argument. Special treatment is reserved to "-hide", which accepts both 0 or 1 parameters.
This commit is contained in:
parent
7ae5c25bc8
commit
43d02af81b
|
|
@ -180,6 +180,11 @@ class Options implements Cloneable, OptionProvider {
|
|||
|
||||
/** Set the options based on a lingle option and its arguments */
|
||||
void setOption(String[] opt) {
|
||||
if(!opt[0].equals("-hide") && optionLength(opt[0]) > opt.length) {
|
||||
System.err.println("Skipping option '" + opt[0] + "', missing argument");
|
||||
return;
|
||||
}
|
||||
|
||||
if(opt[0].equals("-qualify")) {
|
||||
showQualified = true;
|
||||
} else if (opt[0].equals("-!qualify")) {
|
||||
|
|
|
|||
|
|
@ -180,6 +180,11 @@ class Options implements Cloneable, OptionProvider {
|
|||
|
||||
/** Set the options based on a lingle option and its arguments */
|
||||
void setOption(String[] opt) {
|
||||
if(!opt[0].equals("-hide") && optionLength(opt[0]) > opt.length) {
|
||||
System.err.println("Skipping option '" + opt[0] + "', missing argument");
|
||||
return;
|
||||
}
|
||||
|
||||
if(opt[0].equals("-qualify")) {
|
||||
showQualified = true;
|
||||
} else if (opt[0].equals("-!qualify")) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue