[
https://issues.apache.org/jira/browse/LUCENE-3877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235065#comment-13235065
]
Greg Bowyer edited comment on LUCENE-3877 at 3/21/12 9:51 PM:
--------------------------------------------------------------
Thats a good point and started bugging me last night when I was thinking about
it.
As as result attached is a static analysis version that will hate any GETSTATIC
java/lang/System::(err|out) (I briefly looked at findbugs and did not find a
working version for this idea)
This one uses ASM 3.3
Its dumb output looks like
/opt/sun-jdk-1.7.0/bin/java -classpath
/tmp/test.jar:/tmp/out/production:/tmp/asm-all-3.2.jar SystemPrintCheck
/tmp/test.jar
SystemPrintCheck$SystemOutMethodVisitor.visitMethodInsn @ SystemPrintCheck.java
+42
SystemPrintCheck.main @ SystemPrintCheck.java +102
Process finished with exit code 1
was (Author: [email protected]):
Thats a good point and started bugging me last night when I was thinking
about it.
As as result attached is a static analysis version that will hate any GETSTATIC
java/lang/System::(err|out) (I briefly looked at findbugs and did not find a
working version for this idea)
This one uses ASM 3.3
> Lucene should not call System.out.println
> -----------------------------------------
>
> Key: LUCENE-3877
> URL: https://issues.apache.org/jira/browse/LUCENE-3877
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Michael McCandless
> Fix For: 3.6, 4.0
>
> Attachments: IllegalSystemTest.java, IllegalSystemTest.java,
> SystemPrintCheck.java
>
>
> We seem to have accumulated a few random sops...
> Eg, PairOutputs.java (oal.util.fst) and MultiDocValues.java, at least.
> Can we somehow detect (eg, have a test failure) if we accidentally leave
> errant System.out.println's (leftover from debugging)...?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]