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.

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

Commit messages:
 - Use out.println instead of System.out.println so output ends up in the right 
place when the two are not the same.

Changes: https://git.openjdk.java.net/jdk/pull/2887/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2887&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263055
  Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2887.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2887/head:pull/2887

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

Reply via email to