src/share/vm/utilities/debug.cpp

changeset 4070
145ffab733e7
parent 4037
da91efe96a93
child 4176
4202510ee0fe
     1.1 --- a/src/share/vm/utilities/debug.cpp	Thu Sep 20 13:49:27 2012 -0700
     1.2 +++ b/src/share/vm/utilities/debug.cpp	Thu Sep 20 16:27:51 2012 -0700
     1.3 @@ -101,14 +101,13 @@
     1.4  
     1.5  void warning(const char* format, ...) {
     1.6    if (PrintWarnings) {
     1.7 -    // In case error happens before init or during shutdown
     1.8 -    if (tty == NULL) ostream_init();
     1.9 -
    1.10 -    tty->print("%s warning: ", VM_Version::vm_name());
    1.11 +    FILE* const err = defaultStream::error_stream();
    1.12 +    jio_fprintf(err, "%s warning: ", VM_Version::vm_name());
    1.13      va_list ap;
    1.14      va_start(ap, format);
    1.15 -    tty->vprint_cr(format, ap);
    1.16 +    vfprintf(err, format, ap);
    1.17      va_end(ap);
    1.18 +    fputc('\n', err);
    1.19    }
    1.20    if (BreakAtWarning) BREAKPOINT;
    1.21  }

mercurial