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

Yasumasa Suenaga ysuenaga at openjdk.java.net
Fri Mar 12 00:43:13 UTC 2021


On Tue, 9 Mar 2021 04:52:57 GMT, Chris Plummer <cjplummer 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).

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

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


More information about the serviceability-dev mailing list