publicclass T6595666 { void m() { // the following line must create warnings with -Xlint, because of unchecked conversion
List<Integer> list = new ArrayList();
}
String basename = T6595666.class.getName();
File srcFile = new File(testSrc, basename+".java");
File classFile = new File(basename+".class");
classFile.delete(); if (classFile.exists()) thrownew Exception("setup error, can't delete " + classFile);
compile(1, "-d", ".", "-Xlint", "-Werror", srcFile.getPath()); if (classFile.exists()) thrownew Exception("failed: found " + classFile);
compile(0, "-d", ".", "-Xlint", srcFile.getPath()); if (!classFile.exists()) thrownew Exception("failed: " + classFile + " not found");
}
privatestaticvoid compile(int rc, String... args) throws Exception {
System.err.println("compile: " + Arrays.asList(args));
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw); int rc2 = com.sun.tools.javac.Main.compile(args, pw);
pw.close();
System.err.println(sw); if (rc != rc2) thrownew Exception("bad exit code; expected " + rc + ", found " + rc2);
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.21Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.