提交 46fbc4a0 编写于 作者: S sherman

4690407: JAR tool: option -i can't be combined with other options

Summary: -i can't combined with cxut, do sanity check on options
Reviewed-by: martin
上级 0fb6f809
......@@ -306,28 +306,28 @@ class Main {
for (int i = 0; i < flags.length(); i++) {
switch (flags.charAt(i)) {
case 'c':
if (xflag || tflag || uflag) {
if (xflag || tflag || uflag || iflag) {
usageError();
return false;
}
cflag = true;
break;
case 'u':
if (cflag || xflag || tflag) {
if (cflag || xflag || tflag || iflag) {
usageError();
return false;
}
uflag = true;
break;
case 'x':
if (cflag || uflag || tflag) {
if (cflag || uflag || tflag || iflag) {
usageError();
return false;
}
xflag = true;
break;
case 't':
if (cflag || uflag || xflag) {
if (cflag || uflag || xflag || iflag) {
usageError();
return false;
}
......@@ -349,6 +349,10 @@ class Main {
flag0 = true;
break;
case 'i':
if (cflag || uflag || xflag || tflag) {
usageError();
return false;
}
// do not increase the counter, files will contain rootjar
rootjar = args[count++];
iflag = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册