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

Uwe Schindler commented on LUCENE-4199:
---------------------------------------

Thanks! Thats helkpful.

I found in the PMD and FindBugs projects list of APIs:
- http://old.nabble.com/Default-charset-detector-td16231149.html [we can 
copypaste!]

Actually findbugs has a plugin to do that but PMD has not yet resolved the 
issue at all. So my detector which is horribly fast is the best we get at the 
moment 
(http://sourceforge.net/tracker/?func=detail&atid=479921&aid=2978603&group_id=56262).
                
> Add ANT tool to track/disallow "forbidden" method invocations
> -------------------------------------------------------------
>
>                 Key: LUCENE-4199
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4199
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 4.0-ALPHA
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0
>
>         Attachments: LUCENE-4199.patch, LUCENE-4199.patch, LUCENE-4199.patch
>
>
> In LUCENE-3877 Greg Bowyer has some asm.jar-based code to inspe ct class 
> files for System.out/err class. I wanted to modify this code to run it in a 
> jar-linter task on ant, so all compiled class files are parsed and 
> method/ctor calls to e.g. new String(byte[]) without charset are forbidden. 
> We would add a list of method signatures that we dont want to have (new 
> FileReader(File), commons.IOUtils.loadFileToString()) and this linter will 
> throw BuildException after static inspection, if any class file in 
> Lucene/Solr (including line numbers) uses any method call.
> Greg's code would be changed to use visitMethodInsn visitor, very easy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to