[ 
https://issues.apache.org/jira/browse/CALCITE-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340318#comment-17340318
 ] 

Julian Hyde commented on CALCITE-4598:
--------------------------------------

There are about 100 uses of {{System.out}} in Calcite and its tests. Most of 
them are pretty benign - printing debug messages if enabled by 
{{-Dcalcite.debug}}; examples that print to stdout.

I don't see any particular benefit to making this change.

I agree with the general policy that code library code should not write to 
stdout in normal circumstances (and that includes throwing and handling 
errors). But not all of Calcite is library code. So the policy needs to be 
enforced by reviewers, not by automated rules.

> Forbid the use of System.out
> ----------------------------
>
>                 Key: CALCITE-4598
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4598
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.26.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>
> System.out.println often results in useless logging which is impossible to 
> disable in the client code.
> We should remove all the uses of System.out.println and add something like 
> jdk-system-out from forbiddenApis or 
> https://errorprone.info/bugpattern/SystemOut
> I'm inclined to errorprone since it provides a clear way to suppress the 
> warning (add annotation).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to