提交 16d08832 编写于 作者: K kizune

8033686: Internal error for zero indent

Reviewed-by: ksrini
上级 3c3631f9
......@@ -309,7 +309,9 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
void process(JavapTask task, String opt, String arg) throws BadArgs {
int sep = opt.indexOf(":");
try {
task.options.indentWidth = Integer.valueOf(opt.substring(sep + 1));
int i = Integer.valueOf(opt.substring(sep + 1));
if (i > 0) // silently ignore invalid values
task.options.indentWidth = i;
} catch (NumberFormatException e) {
}
}
......@@ -325,7 +327,9 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
void process(JavapTask task, String opt, String arg) throws BadArgs {
int sep = opt.indexOf(":");
try {
task.options.tabColumn = Integer.valueOf(opt.substring(sep + 1));
int i = Integer.valueOf(opt.substring(sep + 1));
if (i > 0) // silently ignore invalid values
task.options.tabColumn = i;
} catch (NumberFormatException e) {
}
}
......
......@@ -86,8 +86,8 @@ public class Options {
public boolean showConstants;
public boolean sysInfo;
public boolean showInnerClasses;
public int indentWidth = 2; // #spaces per indentWidth level
public int tabColumn = 40; // column number for comments
public int indentWidth = 2; // #spaces per indentWidth level; must be > 0
public int tabColumn = 40; // column number for comments; must be > 0
public boolean compat; // bug-for-bug compatibility mode with old javap
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册