8007907: javap, method com.sun.tools.javap.Main.run returns 0 even in case of class not found error

Reviewed-by: jjg
This commit is contained in:
Vicente Romero 2013-06-11 09:59:34 +01:00
parent 4836bfbcf1
commit 3596018eb7
6 changed files with 117 additions and 43 deletions

View file

@ -66,8 +66,7 @@ public class JavapTaskCtorFailWithNPE {
JavaFileManager fm = JavapFileManager.create(dc, pw);
JavapTask t = new JavapTask(pw, fm, dc, null,
Arrays.asList(classToCheck.getPath()));
boolean ok = t.run();
if (!ok)
if (t.run() != 0)
throw new Error("javap failed unexpectedly");
List<Diagnostic<? extends JavaFileObject>> diags = dc.getDiagnostics();