manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONNECTORS-1332) Check Forbidden APIs at Build
Date Fri, 12 Aug 2016 16:42:20 GMT

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

Karl Wright commented on CONNECTORS-1332:
-----------------------------------------

I've applied this patch in a workarea but "ant build" fails as follows:

{code}
forbidden-checks:
[forbiddenapis] Reading bundled API signatures: jdk-unsafe-1.7
[forbiddenapis] Reading bundled API signatures: jdk-non-portable
[forbiddenapis] Loading classes to check...
[forbiddenapis] Scanning classes for violations...
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:111)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:112)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:121)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:122)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:123)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:132)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:133)
[forbiddenapis] Forbidden method invocation: java.io.PrintWriter#printf(java.lan
g.String,java.lang.Object[]) [Uses default locale]
[forbiddenapis]   in org.apache.manifoldcf.agents.output.solr.tests.MockSolrServ
ice$SolrServlet (MockSolrService.java:134)
[forbiddenapis] Scanned 4464 (and 1033 related) class file(s) for forbidden API
invocations (in 8.43s), 8 error(s).
{code}

It sounds like the test classes have not be fixed?

Also, I note that it's scanning the jars in the distribution areas at the wrong time.  The
build process is as follows:
(1) The framework is built
(2) Each connector is built and contributes to the dist area

The check is taking place at framework build time, which is fine but should only be expected
or permitted to scan non-connector jars.  There should be a forbidden api check target in
every connector build file instead.

> Check Forbidden APIs at Build
> -----------------------------
>
>                 Key: CONNECTORS-1332
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1332
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: ManifoldCF 2.4
>            Reporter: Furkan KAMACI
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 2.5
>
>         Attachments: CONNECTORS-1332.patch
>
>
> We should avoid [forbidden calls|https://github.com/policeman-tools/forbidden-apis/wiki]
 and check for it in the ant build.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message