Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8002168

Cleanup initialization of javadoc Messager

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • tools
    • None
    • b65
    • Verified

      6958836 added support for javadoc -Xmaxerrs and -Xmaxwarns

      However, the changeset required an ugly hack to work around initialization issues for Messager/Log.
      http://hg.openjdk.java.net/jdk8/jdk8/langtools/rev/d1ea43cb71c1

      - context = new Context();
      - messager = new Messager(context, programName, errWriter, warnWriter, noticeWriter);
      + Context tempContext = new Context(); // interim context until option decoding completed
      + messager = new Messager(tempContext, programName, errWriter, warnWriter, noticeWriter);

      However, the ugly hack is no longer necessary because Messager/Log is more tolerant of initialization order.
      See 7108668: allow Log to be initialized and used earlier

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: