Bug 60805 - Remove calls to System.out.print and System.out.println
Summary: Remove calls to System.out.print and System.out.println
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
: 61536 (view as bug list)
Depends on: 60787
Blocks:
  Show dependency tree
 
Reported: 2017-03-02 19:21 UTC by Javen O'Neal
Modified: 2017-09-19 15:56 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javen O'Neal 2017-03-02 19:21:29 UTC
System.out.print and System.out.println could potentially be added to forbidden apis if we can exclude dev classes.

grep -r -l --exclude-dir=.svn System.out.println src/java/ src/ooxml/java src/scratchpad/src/
lists 62 files, most of which are dev classes, but includes some classes that shouldn't be using System.out.println, such as:
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
Comment 1 Dominik Stadler 2017-03-19 21:09:07 UTC
There is a bundled signature for this:

            <bundledsignatures name="jdk-system-out"/>


However disabling forbidden-apis in all the examples and devtools via annotation is a bit tedious and excludes all api-checks in those classes/methods.
Comment 2 Javen O'Neal 2017-09-19 15:21:47 UTC
*** Bug 61536 has been marked as a duplicate of this bug. ***
Comment 3 Tim Allison 2017-09-19 15:24:36 UTC
Doh.  Thank you, Javen...
Comment 4 Tim Allison 2017-09-19 15:56:32 UTC
r1808903 focused on println in tests.

* redirected stdout for x.main(args) calls.

* deleted a few printlns that were prob useful during development.

* commented out a few printlns that I felt someone might want to turn back on during development

* converted some to POILogger.log()

* left the printlns in MemoryUsage...not sure what to do with those?!