Remove debugging code print_cpool_bytes

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 24
    • Component/s: hotspot
    • b07

      Original title print_cpool_bytes unnecessarily flushes all streams.

      The function print_cpool_bytes (in constantPool.cpp) makes multiple calls to printf, and at the end calls fflush. That fflush call used to have an argument of 0, which was changed to nullptr by JDK-8337416. That change was made to remove a possible -Wzero-used-as-null-pointer-constant warning, since the argument type is FILE*. So changing to nullptr maintained the existing behavior, of fflush'ing all streams. However, it is likely that the intended behavior here is to just flush stdout, and 0 was being incorrectly used for that. Probably it should be using fflush(stdout).

            Assignee:
            Coleen Phillimore
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: