[
https://issues.apache.org/jira/browse/LUCENE-4570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13577410#comment-13577410
]
Uwe Schindler commented on LUCENE-4570:
---------------------------------------
Thanks Dawid! I had the same problem with J9 like you explained (e.g.
java.lang.Object is in some crazy extension dir). I solved the problem in the
exact same way like you did (checking the URLConnection instance type and use
more exotic class names). The final solution I comitted was easier:
RuntimeMXBean.getBootClassPath() and is supported on all recent JDKs (although
its documented that it may be unsupported, they have a boolean getter to detect
this). I build a Set from the classpath components (JAR files and directories).
When loading the classes later, i lookup the JarFile's of the class that was
loaded by the checker to find out if it is a RuntimeClass or not.
> Release ForbiddenAPI checker on Google Code
> -------------------------------------------
>
> Key: LUCENE-4570
> URL: https://issues.apache.org/jira/browse/LUCENE-4570
> Project: Lucene - Core
> Issue Type: New Feature
> Components: general/build
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4570-maven-inherited.patch,
> LUCENE-4570-maven.patch, LUCENE-4570-maven.patch, LUCENE-4570.patch,
> LUCENE-4570.patch, LUCENE-4570.patch, LUCENE-4570.patch, LUCENE-4570.patch
>
>
> Currently there is source code in lucene/tools/src (e.g. Forbidden APIs
> checker ant task).
> It would be convenient if you could download this thing in your ant build
> from ivy (especially if maybe it included our definitions .txt files as
> resources).
> In general checking for locale/charset violations in this way is a pretty
> general useful thing for a server-side app.
> Can we either release lucene-tools.jar as an artifact, or maybe alternatively
> move this somewhere else as a standalone project and suck it in ourselves?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]