lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elbek kamoliddinov <>
Subject SuppressForbidden for anonymous classes
Date Tue, 16 Jul 2019 17:05:13 GMT
Hello everyone.
We use Lucene's nice forbidden api check tool. I wonder if anonymous
classes could be supressed using supress annotation. For example:

httpService = new HttpService(...) {
    @SuppressForbidden(reason = "Sun's HTTP server usage")
    protected HttpHandler createHandler(...) {
        return new HttpHandler(...) {
            protected void handle(HttpExchange he) {

when I run check for this code I get:
   ERROR: Forbidden interface use:
[non-portable or internal runtime class]

Since createHandler method already has supress annotation, I was expecting
it would be supressed. Any way to supress this without creating separate

Thanks in advance.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message