RFR: 8263055: hsdb Command Line Debugger does not properly direct output for some commands

Chris Plummer cjplummer at openjdk.java.net
Fri Mar 12 21:10:09 UTC 2021


On Fri, 12 Mar 2021 00:40:41 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> I ran the hsdb Command Line Debugger (Windows -> Console menu item) and tried the class and classes commands, and neither appeared to produce any output. Other commands seemed to work as expected. I then went back to the terminal window I used to launch hsdb, and notice all the output from class and classes commands went there instead. The reason is because these commands are using System.out.println instead of out.println. "out" is a PrintStream field of the CommandProcessor instance, and should be used for all output other than error output, which can use "err".
>> 
>> We have no test for this, but I did run the hsdb GUI, brought up the Command Line Debugger, and confirmed that `class` and `classes` now properly show the output there. We do have clhsdb tests that also exercise this CommandProcessor code, but clhsdb directs all the output to System.out, so `out.println` and `System.out.println` end up being the same, thus the issue was not noticed.
>
> Marked as reviewed by ysuenaga (Reviewer).

Thanks, Yasumasa and Alex!

-------------

PR: https://git.openjdk.java.net/jdk/pull/2887


More information about the serviceability-dev mailing list