Lucene - Core
  1. Lucene - Core
  2. LUCENE-3877

Lucene should not call System.out.println

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA, 5.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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)...?

      1. IllegalSystemTest.java
        2 kB
        Greg Bowyer
      2. IllegalSystemTest.java
        2 kB
        Greg Bowyer
      3. LUCENE-3877.patch
        51 kB
        Robert Muir
      4. LUCENE-3877.patch
        2 kB
        Robert Muir
      5. SystemPrintCheck.java
        5 kB
        Greg Bowyer

        Activity

        Hide
        Michael McCandless added a comment -

        +1, thanks Robert!

        Show
        Michael McCandless added a comment - +1, thanks Robert!
        Hide
        Robert Muir added a comment -

        Here's a patch: including fixes.

        I think its ready to commit

        Show
        Robert Muir added a comment - Here's a patch: including fixes. I think its ready to commit
        Hide
        Robert Muir added a comment -

        Here's a patch implementing this check with LUCENE-4202. It excludes any test code, but I didnt add any exceptions for legitimate command-line tools.

        Current list looks like:

        check-system-out:
        [forbidden-apis] Reading inline API signatures...
        [forbidden-apis] Reading API signatures: /home/rmuir/workspace/lucene-trunk/lucene/tools/forbiddenApis/system-out.txt
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.HyphenationTree (HyphenationTree.java:467)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.PatternParser (PatternParser.java:408)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.PatternParser (PatternParser.java:412)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.PatternParser (PatternParser.java:416)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:637)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:638)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:640)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:658)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:659)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:660)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:292)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:302)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:312)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:326)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:336)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:346)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:356)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:366)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:376)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:386)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:395)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:404)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:413)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.PorterStemmer (PorterStemmer.java:529)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.PorterStemmer (PorterStemmer.java:534)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.en.PorterStemmer (PorterStemmer.java:542)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:314)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:320)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:336)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:346)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:382)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.analysis.pt.RSLPStemmerBase$RuleWithSetExceptions (RSLPStemmerBase.java:135)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.analysis.pt.RSLPStemmerBase$RuleWithSuffixExceptions (RSLPStemmerBase.java:159)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.tartarus.snowball.SnowballProgram (SnowballProgram.java:438)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.analysis.cn.smart.AnalyzerProfile (AnalyzerProfile.java:69)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.analysis.cn.smart.AnalyzerProfile (AnalyzerProfile.java:71)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.analysis.cn.smart.AnalyzerProfile (AnalyzerProfile.java:73)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.egothor.stemmer.Compile (Compile.java:126)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.egothor.stemmer.DiffIt (DiffIt.java:107)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.egothor.stemmer.DiffIt (DiffIt.java:111)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.egothor.stemmer.Row (Row.java:301)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.egothor.stemmer.Row (Row.java:303)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.egothor.stemmer.Trie (Trie.java:379)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:95)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:102)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:106)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:116)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:117)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:123)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:127)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:128)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:129)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.PerfRunData (PerfRunData.java:134)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.PerfRunData (PerfRunData.java:135)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource (ContentItemsSource.java:178)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser (DemoHTMLParser.java:58)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker (EnwikiQueryMaker.java:110)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker (FileBasedQueryMaker.java:84)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker (FileBasedQueryMaker.java:93)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker (ReutersQueryMaker.java:90)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:195)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:204)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:227)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:242)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:243)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager (HTMLParserTokenManager.java:12)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.demohtml.ParserThread (ParserThread.java:35)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.feeds.demohtml.ParserThread (ParserThread.java:37)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.programmatic.Sample (Sample.java:72)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask (CloseReaderTask.java:41)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask (CloseTaxonomyReaderTask.java:40)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask (CreateIndexTask.java:181)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask (CreateIndexTask.java:183)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask (NearRealtimeReaderTask.java:108)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask (NearRealtimeReaderTask.java:110)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask (NearRealtimeReaderTask.java:112)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask (NewAnalyzerTask.java:81)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask (NewCollationAnalyzerTask.java:88)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask (NewLocaleTask.java:66)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask (NewShingleAnalyzerTask.java:83)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.PerfTask (PerfTask.java:138)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.PerfTask (PerfTask.java:271)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask (PrintReaderTask.java:54)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:140)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:141)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:142)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:146)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:40)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:41)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:42)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:43)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:40)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:41)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:43)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:44)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:41)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:42)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:44)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:45)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:41)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:42)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:44)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:45)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:41)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:42)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:44)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:45)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:43)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:44)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:46)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:47)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:117)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:121)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:123)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:307)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:308)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:309)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:44)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:45)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:46)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:47)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:48)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:49)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:50)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:65)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder (QualityQueriesFinder.java:54)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder (QualityQueriesFinder.java:60)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder (QualityQueriesFinder.java:112)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractReuters (ExtractReuters.java:46)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractReuters (ExtractReuters.java:63)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractReuters (ExtractReuters.java:152)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:50)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:100)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:111)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:145)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:155)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:157)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1963)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1965)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1973)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1975)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1980)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1985)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1992)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:116)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:128)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:150)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:154)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:180)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:210)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:223)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:255)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:271)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:344)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:378)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:387)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:398)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:402)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:405)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:408)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:354)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:388)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:398)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:600)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:660)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1208)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1249)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1368)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1602)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1691)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1700)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1707)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1714)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1723)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1724)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1753)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1758)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1762)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1771)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1772)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1772)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1778)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1787)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1789)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1790)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1793)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1795)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1797)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1798)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CheckIndex (CheckIndex.java:1801)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:56)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:57)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:58)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:59)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:60)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:61)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:62)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:63)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:66)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:82)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:87)
        [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream)
        [forbidden-apis]   in org.apache.lucene.search.FieldCacheImpl$Cache (FieldCacheImpl.java:279)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockStressTest (LockStressTest.java:37)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockStressTest (LockStressTest.java:58)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockStressTest (LockStressTest.java:100)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockStressTest (LockStressTest.java:104)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:45)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:53)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:72)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:78)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:84)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.PrintStreamInfoStream (PrintStreamInfoStream.java:65)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.util.PrintStreamInfoStream (PrintStreamInfoStream.java:65)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:74)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:80)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:86)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:122)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:125)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:197)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.IndexFiles (IndexFiles.java:203)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:50)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:83)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:103)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:118)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:126)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:156)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:163)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:164)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:177)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:184)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:187)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:190)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:202)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:204)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:207)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:209)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.demo.SearchFiles (SearchFiles.java:230)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.ArrayHashMap (ArrayHashMap.java:394)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.FloatToObjectMap (FloatToObjectMap.java:467)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.IntHashSet (IntHashSet.java:395)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.IntToDoubleMap (IntToDoubleMap.java:466)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.IntToIntMap (IntToIntMap.java:463)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.IntToObjectMap (IntToObjectMap.java:467)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.ObjectToFloatMap (ObjectToFloatMap.java:468)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.util.collections.ObjectToIntMap (ObjectToIntMap.java:467)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:57)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:69)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:96)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:115)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:63)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:65)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:66)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:106)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:102)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:108)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:114)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:115)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:116)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:117)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:118)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:135)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:141)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:145)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.GetTermInfo (GetTermInfo.java:53)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.GetTermInfo (GetTermInfo.java:58)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.HighFreqTerms (HighFreqTerms.java:88)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.HighFreqTerms (HighFreqTerms.java:95)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.HighFreqTerms (HighFreqTerms.java:104)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:36)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:50)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:53)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:56)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.queryparser.classic.QueryParserTokenManager (QueryParserTokenManager.java:20)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.queryparser.flexible.messages.NLS (NLS.java:178)
        [forbidden-apis] Forbidden field access: java.lang.System#err
        [forbidden-apis]   in org.apache.lucene.queryparser.flexible.messages.NLS (NLS.java:182)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParserTokenManager (StandardSyntaxParserTokenManager.java:46)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.queryparser.surround.parser.QueryParserTokenManager (QueryParserTokenManager.java:22)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.queryparser.surround.query.FieldsQuery (FieldsQuery.java:63)
        [forbidden-apis] Forbidden field access: java.lang.System#out
        [forbidden-apis]   in org.apache.lucene.spatial.prefix.tree.QuadPrefixTree (QuadPrefixTree.java:117)
        [forbidden-apis] Scanned 3081 class file(s) for forbidden API invocations (in 0.33s), 279 error(s).
        
        BUILD FAILED
        /home/rmuir/workspace/lucene-trunk/lucene/build.xml:190: Check for forbidden API calls failed, see log.
        
        Show
        Robert Muir added a comment - Here's a patch implementing this check with LUCENE-4202 . It excludes any test code, but I didnt add any exceptions for legitimate command-line tools. Current list looks like: check-system-out: [forbidden-apis] Reading inline API signatures... [forbidden-apis] Reading API signatures: /home/rmuir/workspace/lucene-trunk/lucene/tools/forbiddenApis/system-out.txt [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.HyphenationTree (HyphenationTree.java:467) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.PatternParser (PatternParser.java:408) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.PatternParser (PatternParser.java:412) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.PatternParser (PatternParser.java:416) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:637) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:638) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:640) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:658) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:659) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.compound.hyphenation.TernaryTree (TernaryTree.java:660) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:292) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:302) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:312) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:326) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:336) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:346) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:356) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:366) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:376) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:386) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:395) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:404) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.KStemmer (KStemmer.java:413) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.PorterStemmer (PorterStemmer.java:529) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.PorterStemmer (PorterStemmer.java:534) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.en.PorterStemmer (PorterStemmer.java:542) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:314) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:320) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:336) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:346) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.analysis.hunspell.HunspellStemmer (HunspellStemmer.java:382) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.analysis.pt.RSLPStemmerBase$RuleWithSetExceptions (RSLPStemmerBase.java:135) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.analysis.pt.RSLPStemmerBase$RuleWithSuffixExceptions (RSLPStemmerBase.java:159) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.tartarus.snowball.SnowballProgram (SnowballProgram.java:438) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.analysis.cn.smart.AnalyzerProfile (AnalyzerProfile.java:69) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.analysis.cn.smart.AnalyzerProfile (AnalyzerProfile.java:71) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.analysis.cn.smart.AnalyzerProfile (AnalyzerProfile.java:73) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.egothor.stemmer.Compile (Compile.java:126) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.egothor.stemmer.DiffIt (DiffIt.java:107) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.egothor.stemmer.DiffIt (DiffIt.java:111) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.egothor.stemmer.Row (Row.java:301) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.egothor.stemmer.Row (Row.java:303) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.egothor.stemmer.Trie (Trie.java:379) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:95) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:102) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:106) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:116) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:117) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:123) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:127) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:128) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.Benchmark (Benchmark.java:129) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.PerfRunData (PerfRunData.java:134) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.PerfRunData (PerfRunData.java:135) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource (ContentItemsSource.java:178) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser (DemoHTMLParser.java:58) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker (EnwikiQueryMaker.java:110) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker (FileBasedQueryMaker.java:84) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker (FileBasedQueryMaker.java:93) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker (ReutersQueryMaker.java:90) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:195) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:204) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:227) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:242) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.TrecContentSource (TrecContentSource.java:243) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager (HTMLParserTokenManager.java:12) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.demohtml.ParserThread (ParserThread.java:35) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.feeds.demohtml.ParserThread (ParserThread.java:37) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.programmatic.Sample (Sample.java:72) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask (CloseReaderTask.java:41) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask (CloseTaxonomyReaderTask.java:40) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask (CreateIndexTask.java:181) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask (CreateIndexTask.java:183) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask (NearRealtimeReaderTask.java:108) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask (NearRealtimeReaderTask.java:110) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask (NearRealtimeReaderTask.java:112) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask (NewAnalyzerTask.java:81) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask (NewCollationAnalyzerTask.java:88) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask (NewLocaleTask.java:66) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask (NewShingleAnalyzerTask.java:83) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.PerfTask (PerfTask.java:138) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.PerfTask (PerfTask.java:271) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask (PrintReaderTask.java:54) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:140) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:141) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:142) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.ReadTask (ReadTask.java:146) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:40) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:41) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:42) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepAllTask (RepAllTask.java:43) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:40) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:41) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:43) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask (RepSelectByPrefTask.java:44) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:41) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:42) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:44) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask (RepSumByNameRoundTask.java:45) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:41) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:42) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:44) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask (RepSumByNameTask.java:45) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:41) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:42) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:44) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask (RepSumByPrefRoundTask.java:45) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:43) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:44) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:46) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask (RepSumByPrefTask.java:47) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:117) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:121) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:123) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:307) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:308) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.byTask.utils.Config (Config.java:309) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:44) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:45) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:46) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:47) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:48) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:49) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:50) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.quality.trec.QueryDriver (QueryDriver.java:65) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder (QualityQueriesFinder.java:54) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder (QualityQueriesFinder.java:60) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder (QualityQueriesFinder.java:112) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractReuters (ExtractReuters.java:46) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractReuters (ExtractReuters.java:63) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractReuters (ExtractReuters.java:152) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:50) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:100) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:111) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:145) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:155) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.benchmark.utils.ExtractWikipedia (ExtractWikipedia.java:157) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1963) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1965) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1973) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1975) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1980) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1985) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.BlockTreeTermsReader$FieldReader$SegmentTermsEnum (BlockTreeTermsReader.java:1992) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:116) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:128) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:150) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:154) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:180) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:210) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:223) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:255) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:271) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:344) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:378) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:387) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:398) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:402) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:405) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.codecs.pulsing.PulsingPostingsWriter (PulsingPostingsWriter.java:408) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:354) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:388) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:398) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:600) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:660) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1208) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1249) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1368) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1602) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1691) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1700) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1707) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1714) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1723) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1724) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1753) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1758) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1762) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1771) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1772) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1772) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1778) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1787) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1789) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1790) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1793) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1795) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1797) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1798) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CheckIndex (CheckIndex.java:1801) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:56) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:57) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:58) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:59) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:60) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:61) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:62) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:63) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:66) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:82) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.IndexUpgrader (IndexUpgrader.java:87) [forbidden-apis] Forbidden method invocation: java.lang.Throwable#printStackTrace(java.io.PrintStream) [forbidden-apis] in org.apache.lucene.search.FieldCacheImpl$Cache (FieldCacheImpl.java:279) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockStressTest (LockStressTest.java:37) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockStressTest (LockStressTest.java:58) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockStressTest (LockStressTest.java:100) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockStressTest (LockStressTest.java:104) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:45) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:53) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:72) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:78) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.store.LockVerifyServer (LockVerifyServer.java:84) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.PrintStreamInfoStream (PrintStreamInfoStream.java:65) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.util.PrintStreamInfoStream (PrintStreamInfoStream.java:65) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:74) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:80) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:86) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:122) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:125) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:197) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.IndexFiles (IndexFiles.java:203) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:50) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:83) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:103) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:118) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:126) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:156) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:163) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:164) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:177) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:184) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:187) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:190) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:202) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:204) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:207) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:209) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.demo.SearchFiles (SearchFiles.java:230) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.ArrayHashMap (ArrayHashMap.java:394) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.FloatToObjectMap (FloatToObjectMap.java:467) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.IntHashSet (IntHashSet.java:395) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.IntToDoubleMap (IntToDoubleMap.java:466) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.IntToIntMap (IntToIntMap.java:463) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.IntToObjectMap (IntToObjectMap.java:467) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.ObjectToFloatMap (ObjectToFloatMap.java:468) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.util.collections.ObjectToIntMap (ObjectToIntMap.java:467) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:57) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:69) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:96) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.CompoundFileExtractor (CompoundFileExtractor.java:115) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:63) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:65) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:66) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.index.IndexSplitter (IndexSplitter.java:106) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:102) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:108) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:114) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:115) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:116) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:117) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:118) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:135) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:141) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.index.MultiPassIndexSplitter (MultiPassIndexSplitter.java:145) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.GetTermInfo (GetTermInfo.java:53) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.GetTermInfo (GetTermInfo.java:58) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.HighFreqTerms (HighFreqTerms.java:88) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.HighFreqTerms (HighFreqTerms.java:95) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.HighFreqTerms (HighFreqTerms.java:104) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:36) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:50) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:53) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.misc.IndexMergeTool (IndexMergeTool.java:56) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.queryparser.classic.QueryParserTokenManager (QueryParserTokenManager.java:20) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.queryparser.flexible.messages.NLS (NLS.java:178) [forbidden-apis] Forbidden field access: java.lang.System#err [forbidden-apis] in org.apache.lucene.queryparser.flexible.messages.NLS (NLS.java:182) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParserTokenManager (StandardSyntaxParserTokenManager.java:46) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.queryparser.surround.parser.QueryParserTokenManager (QueryParserTokenManager.java:22) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.queryparser.surround.query.FieldsQuery (FieldsQuery.java:63) [forbidden-apis] Forbidden field access: java.lang.System#out [forbidden-apis] in org.apache.lucene.spatial.prefix.tree.QuadPrefixTree (QuadPrefixTree.java:117) [forbidden-apis] Scanned 3081 class file(s) for forbidden API invocations (in 0.33s), 279 error(s). BUILD FAILED /home/rmuir/workspace/lucene-trunk/lucene/build.xml:190: Check for forbidden API calls failed, see log.
        Hide
        Robert Muir added a comment -

        I think if we fix LUCENE-4202, we could just have a separate task for this that only runs on a fileset of non-test code? We could also exclude some tools like CheckIndex from it.

        We could add things like:
        System#in
        System#out
        System#err
        Throwable#printStackTrace() <-- eclipse stupid-stubs
        ...

        Show
        Robert Muir added a comment - I think if we fix LUCENE-4202 , we could just have a separate task for this that only runs on a fileset of non-test code? We could also exclude some tools like CheckIndex from it. We could add things like: System#in System#out System#err Throwable#printStackTrace() <-- eclipse stupid-stubs ...
        Hide
        Dawid Weiss added a comment -

        No worries Greg, really. For 3.x I think manual check will do (or what I've done above with AspectJ). For 4.x it'd be nice to have findbugs lint anyway (for this and other issues). It'll most likely require some rules tuning too, so it can be a separate issue.

        Show
        Dawid Weiss added a comment - No worries Greg, really. For 3.x I think manual check will do (or what I've done above with AspectJ). For 4.x it'd be nice to have findbugs lint anyway (for this and other issues). It'll most likely require some rules tuning too, so it can be a separate issue.
        Hide
        Greg Bowyer added a comment -

        Yeah sorry I have been busy at work for a spell, I was going to craft it into a findbugs rule and see if I can get accepted into the findbugs project,

        Just been a bit tied up thats all

        Show
        Greg Bowyer added a comment - Yeah sorry I have been busy at work for a spell, I was going to craft it into a findbugs rule and see if I can get accepted into the findbugs project, Just been a bit tied up thats all
        Hide
        Dawid Weiss added a comment -

        I'd push it to 4.0 (automation in whatever form).

        Show
        Dawid Weiss added a comment - I'd push it to 4.0 (automation in whatever form).
        Hide
        Hoss Man added a comment -

        Issue is marked 3.6 and actively being discussed but has no assignee - assigning to most active committer contributing patches/discussion so far to triage wether this can/should be pushed to 4.0 or not.

        Show
        Hoss Man added a comment - Issue is marked 3.6 and actively being discussed but has no assignee - assigning to most active committer contributing patches/discussion so far to triage wether this can/should be pushed to 4.0 or not.
        Hide
        Dawid Weiss added a comment -

        Oh, btw. I think a FindBugs rule for detecting sysouts/syserrs would be a great addition to FindBugs – you should definitely file it as an improvement there. In reality at least class-level exclusions will be needed to avoid legitimate matches like the ones shown above (main methods, exception handlers), but these can be lived with.

        Show
        Dawid Weiss added a comment - Oh, btw. I think a FindBugs rule for detecting sysouts/syserrs would be a great addition to FindBugs – you should definitely file it as an improvement there. In reality at least class-level exclusions will be needed to avoid legitimate matches like the ones shown above (main methods, exception handlers), but these can be lived with.
        Hide
        Dawid Weiss added a comment -

        My aspectj experiments from yesterday when JIRA was dead.

        I applied that aspect just to see what happens.

        ajc -sourceroots aspects \
           -inpath lucene-core-3.6-SNAPSHOT.jar \
           -d none \
           -cp aspectjrt.jar \
           -showWeaveInfo
        

        Here's what I got:

        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.analysis.PorterStemmer'
        (PorterStemmer.java:529) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.analysis.PorterStemmer'
        (PorterStemmer.java:534) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.analysis.PorterStemmer'
        (PorterStemmer.java:542) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:989)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:996)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1003)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1012)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1013)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1038)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1043)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1047)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1056)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1057)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1062)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1071)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1073)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1074)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1077)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1079)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1081)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1082)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1085)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:55)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:56)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:57)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:58)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:59)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:60)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:61)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:62)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:65)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:81)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:86)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.queryParser.FastCharStream'
        (FastCharStream.java:102) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.queryParser.QueryParser'
        (QueryParser.java:1159) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.queryParser.QueryParser'
        (QueryParser.java:1165) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.queryParser.QueryParserTokenManager'
        (QueryParserTokenManager.java:42) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockStressTest' (LockStressTest.java:37)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockStressTest' (LockStressTest.java:58)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockStressTest'
        (LockStressTest.java:100) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockStressTest'
        (LockStressTest.java:104) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockVerifyServer'
        (LockVerifyServer.java:45) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockVerifyServer'
        (LockVerifyServer.java:53) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockVerifyServer'
        (LockVerifyServer.java:72) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockVerifyServer'
        (LockVerifyServer.java:78) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.store.LockVerifyServer'
        (LockVerifyServer.java:84) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:6)
        

        Many of these are in static main methods and here's where
        aspectj-based solution can be superior to handcoding; because we can
        do this:

           pointcut ignored():
               withincode(public static void main(String[]));
        
           before(): within(org.apache.lucene..*) &&
                     get(static PrintStream System.*) &&
                     !ignored()
           {
               throw new RuntimeException("Attempted sysout/syserr/sysin access.");
           }
        

        applied again:

        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:55)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:56)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:57)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:58)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:59)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:60)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:61)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:62)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:65)
        advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.queryParser.FastCharStream'
        (FastCharStream.java:102) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:16)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.queryParser.QueryParserTokenManager'
        (QueryParserTokenManager.java:42) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:16)
        

        IndexUpgrader has a printUsage() method so we can exclude these by
        name only (no access/ static restriction):

           pointcut ignored():
               withincode(public static void main(String[])) ||
               withincode(              void printUsage(..));
        

        and then we're left with:

        Join point 'field-get(java.io.PrintStream java.lang.System.err)' in
        Type 'org.apache.lucene.queryParser.FastCharStream'
        (FastCharStream.java:102) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:17)
        
        Join point 'field-get(java.io.PrintStream java.lang.System.out)' in
        Type 'org.apache.lucene.queryParser.QueryParserTokenManager'
        (QueryParserTokenManager.java:42) advised by before advice from
        'spikes.NoSysOuts' (NoSysOuts.aj:17)
        

        and these are:

           } catch (IOException e) {
             System.err.println("Caught: " + e + "; ignoring.");
           }
        

        and:

         /** Debug output. */
         public  java.io.PrintStream debugStream = System.out;
        

        This is perhaps the worst cast as it assigns System.out to another
        field and then uses that to call printlns.

        Both of which can be excluded, of course. AspectJ is fun. It's a pity
        it never gained more traction.

        Show
        Dawid Weiss added a comment - My aspectj experiments from yesterday when JIRA was dead. I applied that aspect just to see what happens. ajc -sourceroots aspects \ -inpath lucene-core-3.6-SNAPSHOT.jar \ -d none \ -cp aspectjrt.jar \ -showWeaveInfo Here's what I got: Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.analysis.PorterStemmer' (PorterStemmer.java:529) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.analysis.PorterStemmer' (PorterStemmer.java:534) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.analysis.PorterStemmer' (PorterStemmer.java:542) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:989) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:996) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1003) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1012) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1013) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1038) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1043) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1047) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1056) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1057) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1062) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1071) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1073) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1074) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1077) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1079) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1081) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1082) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.CheckIndex' (CheckIndex.java:1085) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:55) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:56) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:57) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:58) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:59) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:60) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:61) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:62) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:65) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:81) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:86) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.queryParser.FastCharStream' (FastCharStream.java:102) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.queryParser.QueryParser' (QueryParser.java:1159) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.queryParser.QueryParser' (QueryParser.java:1165) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.queryParser.QueryParserTokenManager' (QueryParserTokenManager.java:42) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockStressTest' (LockStressTest.java:37) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockStressTest' (LockStressTest.java:58) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockStressTest' (LockStressTest.java:100) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockStressTest' (LockStressTest.java:104) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockVerifyServer' (LockVerifyServer.java:45) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockVerifyServer' (LockVerifyServer.java:53) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockVerifyServer' (LockVerifyServer.java:72) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockVerifyServer' (LockVerifyServer.java:78) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.store.LockVerifyServer' (LockVerifyServer.java:84) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:6) Many of these are in static main methods and here's where aspectj-based solution can be superior to handcoding; because we can do this: pointcut ignored(): withincode( public static void main( String [])); before(): within(org.apache.lucene..*) && get( static PrintStream System .*) && !ignored() { throw new RuntimeException( "Attempted sysout/syserr/sysin access." ); } applied again: Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:55) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:56) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:57) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:58) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:59) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:60) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:61) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:62) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.index.IndexUpgrader' (IndexUpgrader.java:65) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.queryParser.FastCharStream' (FastCharStream.java:102) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.queryParser.QueryParserTokenManager' (QueryParserTokenManager.java:42) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:16) IndexUpgrader has a printUsage() method so we can exclude these by name only (no access/ static restriction): pointcut ignored(): withincode( public static void main( String [])) || withincode( void printUsage(..)); and then we're left with: Join point 'field-get(java.io.PrintStream java.lang.System.err)' in Type 'org.apache.lucene.queryParser.FastCharStream' (FastCharStream.java:102) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:17) Join point 'field-get(java.io.PrintStream java.lang.System.out)' in Type 'org.apache.lucene.queryParser.QueryParserTokenManager' (QueryParserTokenManager.java:42) advised by before advice from 'spikes.NoSysOuts' (NoSysOuts.aj:17) and these are: } catch (IOException e) { System .err.println( "Caught: " + e + "; ignoring." ); } and: /** Debug output. */ public java.io.PrintStream debugStream = System .out; This is perhaps the worst cast as it assigns System.out to another field and then uses that to call printlns. Both of which can be excluded, of course. AspectJ is fun. It's a pity it never gained more traction.
        Hide
        Dawid Weiss added a comment -

        I have seen it not work in the past for obscure reasons

        Most likely the "reasons" were incorrect pointcut definitions? These can be tricky, I agree. Nonetheless, I've been using AspectJ for a long time and it always fits my needs and expectations. I'm not saying it doesn't have any bugs – I'm sure it has. But the right tool for the right job; it took me about 5 mins to write and apply that aspect (with follow ups, I sent an e-mail to the mailing list, JIRA didn't work at the time).

        I'm not advocating for any tool, really. To me aspectj is a fast tool for expressing where I want a given snippet of code to be injected (or what I want excluded) and for such tasks I don't see a faster or more pleasant to use alternative. Oh, I've been using asmlib too; extensively in fact; so it's not lack of knowledge about the tool itself.

        Show
        Dawid Weiss added a comment - I have seen it not work in the past for obscure reasons Most likely the "reasons" were incorrect pointcut definitions? These can be tricky, I agree. Nonetheless, I've been using AspectJ for a long time and it always fits my needs and expectations. I'm not saying it doesn't have any bugs – I'm sure it has. But the right tool for the right job; it took me about 5 mins to write and apply that aspect (with follow ups, I sent an e-mail to the mailing list, JIRA didn't work at the time). I'm not advocating for any tool, really. To me aspectj is a fast tool for expressing where I want a given snippet of code to be injected (or what I want excluded) and for such tasks I don't see a faster or more pleasant to use alternative. Oh, I've been using asmlib too; extensively in fact; so it's not lack of knowledge about the tool itself.
        Hide
        Greg Bowyer added a comment -

        Well would it sway the argument if I said that the ASM code near directly translates into a findbugs rule (I have done this before)

        I was also not wanting to suggest findbug custom rules at the start because thats a bigger change in including an entire code lint tool (unless its included with lucene already, in which case forgive my stupidity I am still finding my way around)

        Something doesn't fit right in my mind with the AspectJ approach, I have seen it not work in the past for obscure reasons and it feels that running the weaving in pretend to check the verbose output is not much further on from checking the source code in the first place.

        Show
        Greg Bowyer added a comment - Well would it sway the argument if I said that the ASM code near directly translates into a findbugs rule (I have done this before) I was also not wanting to suggest findbug custom rules at the start because thats a bigger change in including an entire code lint tool (unless its included with lucene already, in which case forgive my stupidity I am still finding my way around) Something doesn't fit right in my mind with the AspectJ approach, I have seen it not work in the past for obscure reasons and it feels that running the weaving in pretend to check the verbose output is not much further on from checking the source code in the first place.
        Hide
        Dawid Weiss added a comment -

        I don't like PMD that much either, I'm just saying it seems to have it. If I were to choose though, I'd use aspectj rather than asm-based code. It just seems cleaner to me.

        public aspect NoSysOuts {
            before(): within(org.apache.lucene..*) && 
                      get(static PrintStream System.*) {
                throw new RuntimeException("Attempted sysout/syserr/sysin access.");
            }
        }
        

        You don't even need to run it, just weave with verbose output and see if the aspect matched anywhere.

        Show
        Dawid Weiss added a comment - I don't like PMD that much either, I'm just saying it seems to have it. If I were to choose though, I'd use aspectj rather than asm-based code. It just seems cleaner to me. public aspect NoSysOuts { before(): within(org.apache.lucene..*) && get( static PrintStream System .*) { throw new RuntimeException( "Attempted sysout/syserr/sysin access." ); } } You don't even need to run it, just weave with verbose output and see if the aspect matched anywhere.
        Hide
        Greg Bowyer added a comment -

        Interesting I didnt look at PMD although that is more down to my personal dislike of code lint tools that do source code analysis

        shrugs It was a fun distraction anyhow

        Show
        Greg Bowyer added a comment - Interesting I didnt look at PMD although that is more down to my personal dislike of code lint tools that do source code analysis shrugs It was a fun distraction anyhow
        Hide
        Dawid Weiss added a comment -

        fyi. PMD has a rule for this – SystemPrintln.
        http://pmd.sourceforge.net/rules/index.html

        Didn't check the details though.

        Show
        Dawid Weiss added a comment - fyi. PMD has a rule for this – SystemPrintln. http://pmd.sourceforge.net/rules/index.html Didn't check the details though.
        Hide
        Greg Bowyer added a comment -

        ASM static test version that dislikes System.out / System.err

        Show
        Greg Bowyer added a comment - ASM static test version that dislikes System.out / System.err
        Hide
        Greg Bowyer added a comment - - edited

        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

        Show
        Greg Bowyer added a comment - - edited 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
        Hide
        Dawid Weiss added a comment -

        You can just as well substitute your own implementation of PrintStream using System.setOut/setErr and check stacks on printlns... But I agree with Benson that a static analysis approach is much cleaner. Don't know if there's anything out of the box in findbugs/ pmd, but even if not then this can be done as a 10-liner by applying an aspect to classes via aspectj and parsing the output logs detecting if an aspect has been applied (it shouldn't match anywhere).

        Show
        Dawid Weiss added a comment - You can just as well substitute your own implementation of PrintStream using System.setOut/setErr and check stacks on printlns... But I agree with Benson that a static analysis approach is much cleaner. Don't know if there's anything out of the box in findbugs/ pmd, but even if not then this can be done as a 10-liner by applying an aspect to classes via aspectj and parsing the output logs detecting if an aspect has been applied (it shouldn't match anywhere).
        Hide
        Greg Bowyer added a comment -

        Helps if I upload the right version

        Show
        Greg Bowyer added a comment - Helps if I upload the right version
        Hide
        Greg Bowyer added a comment -

        I took a guess that one way would be to replace the System IO streams with ones that will throw exceptions.

        It requires cglib, and might (due to the abuse of sun.reflect.Reflection to get the callee efficiently) be sun hotspot specific.

        I guess this is not perfect, it would only error out if the code is called

        If there is thought to this being a good thing I could look into how to wire it up to the unit-tests

        Show
        Greg Bowyer added a comment - I took a guess that one way would be to replace the System IO streams with ones that will throw exceptions. It requires cglib, and might (due to the abuse of sun.reflect.Reflection to get the callee efficiently) be sun hotspot specific. I guess this is not perfect, it would only error out if the code is called If there is thought to this being a good thing I could look into how to wire it up to the unit-tests
        Hide
        Michael McCandless added a comment -

        I removed the std prints in lucene/core/src/java that I could find on quick grepping.

        I'll leave this open so we can somehow automatically catch this...

        Show
        Michael McCandless added a comment - I removed the std prints in lucene/core/src/java that I could find on quick grepping. I'll leave this open so we can somehow automatically catch this...
        Hide
        Luca Cavanna added a comment -

        I feel guilty...maybe because I wrote that code yeah, that one should be System.err.
        I thought at least the command line tool usage could be System.out, but that's already System.err for example in IndexUpgrader, so... looks like everything should be System.err. But that's the behaviour for command line tools. "Normal" classes shouldn't have System.err either I guess. Maybe we should mark command line tools as special classes in some way in order to give them more freedom?

        Show
        Luca Cavanna added a comment - I feel guilty...maybe because I wrote that code yeah, that one should be System.err. I thought at least the command line tool usage could be System.out, but that's already System.err for example in IndexUpgrader, so... looks like everything should be System.err. But that's the behaviour for command line tools. "Normal" classes shouldn't have System.err either I guess. Maybe we should mark command line tools as special classes in some way in order to give them more freedom?
        Hide
        Robert Muir added a comment -

        IndexUpgrader is another example. I think if the args are invalid it should be printing to System.err ?

        } else if ("-dir-impl".equals(arg)) {
          if (i == args.length - 1) {
            System.out.println("ERROR: missing value for -dir-impl option");
            System.exit(1);
          }
        
        Show
        Robert Muir added a comment - IndexUpgrader is another example. I think if the args are invalid it should be printing to System.err ? } else if ( "-dir-impl" .equals(arg)) { if (i == args.length - 1) { System .out.println( "ERROR: missing value for -dir-impl option" ); System .exit(1); }
        Hide
        Robert Muir added a comment -

        Some core code legitimately uses System.out.println, e.g. CheckIndex.

        However on review, some of its use cases should actually be System.err...

        Show
        Robert Muir added a comment - Some core code legitimately uses System.out.println, e.g. CheckIndex. However on review, some of its use cases should actually be System.err...
        Hide
        Mark Miller added a comment -

        Don't we now fail if there is a noncommit in the src? Can't we use the same mechanism?

        Show
        Mark Miller added a comment - Don't we now fail if there is a noncommit in the src? Can't we use the same mechanism?
        Hide
        Benson Margulies added a comment -

        findbugs? checkstyle?

        Show
        Benson Margulies added a comment - findbugs? checkstyle?
        Hide
        Dawid Weiss added a comment -

        This is possible by verifying where System.out takes place at runtime via stack analysis. Alternatively a bytecode woven aspect. But at the same time it could also be a find-and-grep over sources? Comments would have to be removed in the pipeline prior to grepping for sysouts.

        Checking all sysouts/syserrs and verifying stack traces there seems like an overkill compared to the above.

        Show
        Dawid Weiss added a comment - This is possible by verifying where System.out takes place at runtime via stack analysis. Alternatively a bytecode woven aspect. But at the same time it could also be a find-and-grep over sources? Comments would have to be removed in the pipeline prior to grepping for sysouts. Checking all sysouts/syserrs and verifying stack traces there seems like an overkill compared to the above.
        Hide
        Michael McCandless added a comment -

        I think it's fine if tests write to the std streams, but not core Lucene code (lucene/core/src/java/*)?

        Show
        Michael McCandless added a comment - I think it's fine if tests write to the std streams, but not core Lucene code (lucene/core/src/java/*)?
        Hide
        Dawid Weiss added a comment -

        Lots of tests write to std streams currently (solr). We could do that fairly easily (in a number of ways) but it'll break a number of tests.

        Show
        Dawid Weiss added a comment - Lots of tests write to std streams currently (solr). We could do that fairly easily (in a number of ways) but it'll break a number of tests.

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development