oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.29k stars 739 forks source link

use upper limit for output data in Command #4475

Closed vladak closed 8 months ago

vladak commented 8 months ago

To avoid exhausting memory when commands produce inordinate amounts of output (think reindex from scratch in verbose mode), this change introduces upper limits for the output lines stored by the Command class. The default is 10k lines and 250 characters for each line. The truncation is visible in the output for both cases via ....

As a side effect, the newline separators are not longer stored in the list of output lines. They are added only when requested using the getoutputstr() or geterroutputstr().