You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/11/28 20:11:00 UTC

[jira] [Commented] (LUCENE-10185) gradle check fails on java 17 (security manager deprecation)

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

ASF subversion and git services commented on LUCENE-10185:
----------------------------------------------------------

Commit 63c89f678d48deb9a40b90498409ad5656d775ce in lucene's branch refs/heads/main from Robert Muir
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=63c89f6 ]

Speed up ECJ tasks by avoiding --release (#484)

LUCENE-10185 caused a large performance regression in ECJ tasks by using the --release flag.

Instead of using --release, we can just disable "terminal deprecation", and leave this check to `javac`. The --release flag makes this tool run 50% slower.

> gradle check fails on java 17 (security manager deprecation)
> ------------------------------------------------------------
>
>                 Key: LUCENE-10185
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10185
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>            Priority: Major
>             Fix For: 9.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> I don't think we should add SuppressWarnings here, instead fix our ECJ linter configuration. Seems like we should be specifying something similar to "-release 11" and it shouldn't care about the new deprecations from java 17. Or if we can't do that, maybe we should disable the "deprecated for removal" check in ECJ entirely?
> {noformat}
> > Task :lucene:core:ecjLintMain
> ----------
> 1. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/NamedThreadFactory.java (at line 42)
>         final SecurityManager s = System.getSecurityManager();
>               ^^^^^^^^^^^^^^^
> The type SecurityManager has been deprecated since version 17 and marked for removal
> ----------
> 2. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/NamedThreadFactory.java (at line 42)
>         final SecurityManager s = System.getSecurityManager();
>                                          ^^^^^^^^^^^^^^^^^^^^
> The method getSecurityManager() from the type System has been deprecated since version 17 and marked for removal
> ----------
> 3. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/NamedThreadFactory.java (at line 43)
>         group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
>                                 ^^^^^^^^^^^^^^^^
> The method getThreadGroup() from the type SecurityManager has been deprecated and marked for removal
> ----------
> ----------
> 4. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java (at line 23)
>         import java.security.AccessControlException;
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The type AccessControlException has been deprecated since version 17 and marked for removal
> ----------
> 5. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java (at line 24)
>         import java.security.AccessController;
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The type AccessController has been deprecated since version 17 and marked for removal
> ----------
> 6. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java (at line 574)
>         AccessController.doPrivileged((PrivilegedAction<Field[]>) target::getDeclaredFields);
>         ^^^^^^^^^^^^^^^^
> The type AccessController has been deprecated since version 17 and marked for removal
> ----------
> 7. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java (at line 574)
>         AccessController.doPrivileged((PrivilegedAction<Field[]>) target::getDeclaredFields);
>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The method doPrivileged(PrivilegedAction<Field[]>) from the type AccessController has been deprecated and marked for removal
> ----------
> 8. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java (at line 575)
>         } catch (AccessControlException e) {
>                  ^^^^^^^^^^^^^^^^^^^^^^
> The type AccessControlException has been deprecated since version 17 and marked for removal
> ----------
> ----------
> 9. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java (at line 33)
>         import java.security.AccessController;
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The type AccessController has been deprecated since version 17 and marked for removal
> ----------
> 10. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java (at line 337)
>         AccessController.doPrivileged((PrivilegedAction<Object>) MMapDirectory::unmapHackImpl);
>         ^^^^^^^^^^^^^^^^
> The type AccessController has been deprecated since version 17 and marked for removal
> ----------
> 11. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java (at line 337)
>         AccessController.doPrivileged((PrivilegedAction<Object>) MMapDirectory::unmapHackImpl);
>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The method doPrivileged(PrivilegedAction<Object>) from the type AccessController has been deprecated and marked for removal
> ----------
> 12. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java (at line 390)
>         AccessController.doPrivileged(
>         ^^^^^^^^^^^^^^^^
> The type AccessController has been deprecated since version 17 and marked for removal
> ----------
> 13. ERROR in /home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java (at line 390)
>         AccessController.doPrivileged(
>               (PrivilegedAction<Throwable>)
>                   () -> {
>                     try {
>                       unmapper.invokeExact(buffer);
>                       return null;
>                     } catch (Throwable t) {
>                       return t;
>                     }
>                   });
>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The method doPrivileged(PrivilegedAction<Throwable>) from the type AccessController has been deprecated and marked for removal
> ----------
> 13 problems (13 errors)
> > Task :lucene:core:ecjLintMain FAILED
> > Task :lucene:expressions:ecjLintMain
> > Task :lucene:codecs:renderJavadoc
> > Task :lucene:facet:ecjLintMain
> FAILURE: Build failed with an exception.
> * What went wrong:
> Execution failed for task ':lucene:core:ecjLintMain'.
> > Process 'command '/usr/lib/jvm/java-17-openjdk/bin/java'' finished with non-zero exit value 255
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
> * Get more help at https://help.gradle.org
> BUILD FAILED in 1m 36s
> 415 actionable tasks: 408 executed, 7 up-to-date
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org