Robert Muir created LUCENE-10185:
------------------------------------

             Summary: 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


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.3.4#803005)

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

Reply via email to