src/share/classes/com/sun/tools/javac/main/Main.java

changeset 757
c44234f680da
parent 700
7b413ac1a720
child 798
4868a36f6fd8
equal deleted inserted replaced
756:d44d6d8493ad 757:c44234f680da
418 comp.compile(fileObjects, 418 comp.compile(fileObjects,
419 classnames.toList(), 419 classnames.toList(),
420 processors); 420 processors);
421 421
422 if (log.expectDiagKeys != null) { 422 if (log.expectDiagKeys != null) {
423 if (log.expectDiagKeys.size() == 0) { 423 if (log.expectDiagKeys.isEmpty()) {
424 Log.printLines(log.noticeWriter, "all expected diagnostics found"); 424 Log.printLines(log.noticeWriter, "all expected diagnostics found");
425 return EXIT_OK; 425 return EXIT_OK;
426 } else { 426 } else {
427 Log.printLines(log.noticeWriter, "expected diagnostic keys not found: " + log.expectDiagKeys); 427 Log.printLines(log.noticeWriter, "expected diagnostic keys not found: " + log.expectDiagKeys);
428 return EXIT_ERROR; 428 return EXIT_ERROR;
504 * annotation processor. 504 * annotation processor.
505 */ 505 */
506 void apMessage(AnnotationProcessingError ex) { 506 void apMessage(AnnotationProcessingError ex) {
507 Log.printLines(out, 507 Log.printLines(out,
508 getLocalizedString("msg.proc.annotation.uncaught.exception")); 508 getLocalizedString("msg.proc.annotation.uncaught.exception"));
509 ex.getCause().printStackTrace(); 509 ex.getCause().printStackTrace(out);
510 } 510 }
511 511
512 /** Display the location and checksum of a class. */ 512 /** Display the location and checksum of a class. */
513 void showClass(String className) { 513 void showClass(String className) {
514 out.println("javac: show class: " + className); 514 out.println("javac: show class: " + className);
561 } 561 }
562 562
563 public static void useRawMessages(boolean enable) { 563 public static void useRawMessages(boolean enable) {
564 if (enable) { 564 if (enable) {
565 messages = new JavacMessages(javacBundleName) { 565 messages = new JavacMessages(javacBundleName) {
566 @Override
566 public String getLocalizedString(String key, Object... args) { 567 public String getLocalizedString(String key, Object... args) {
567 return key; 568 return key;
568 } 569 }
569 }; 570 };
570 } else { 571 } else {

mercurial