Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5136

Avatica build (or CI) must fail if there are deprecation warnings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • avatica-1.26.0
    • None
    • None

    Description

      Avatica build (or CI) must fail if there are deprecation warnings.

      The build currently gives the following warnings on JDK 18:

      core/src/main/java/org/apache/calcite/avatica/remote/DoAsAvaticaHttpClient.java:37: warning: [removal] <T>doAs(Subject,PrivilegedAction<T>) in Subject has been deprecated and marked for removal
          return Subject.doAs(kerberosUtil.getSubject(), new PrivilegedAction<byte[]>() {
                        ^
        where T is a type-variable:
          T extends Object declared in method <T>doAs(Subject,PrivilegedAction<T>)
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      Note: Some input files use unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      1 warning
      
      > Task :server:compileJava
      server/src/main/java/org/apache/calcite/avatica/server/SubjectPreservingPrivilegedThreadFactory.java:19: warning: [removal] AccessController in java.security has been deprecated and marked for removal
      import java.security.AccessController;
                          ^
      server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java:204: warning: [removal] <T>doAs(Subject,PrivilegedAction<T>) in Subject has been deprecated and marked for removal
            Subject.doAs(subject, new PrivilegedAction<Void>() {
                   ^
        where T is a type-variable:
          T extends Object declared in method <T>doAs(Subject,PrivilegedAction<T>)
      server/src/main/java/org/apache/calcite/avatica/server/SubjectPreservingPrivilegedThreadFactory.java:43: warning: [removal] AccessController in java.security has been deprecated and marked for removal
          Subject subject = Subject.getSubject(AccessController.getContext());
                                               ^
      server/src/main/java/org/apache/calcite/avatica/server/SubjectPreservingPrivilegedThreadFactory.java:43: warning: [removal] getSubject(AccessControlContext) in Subject has been deprecated and marked for removal
          Subject subject = Subject.getSubject(AccessController.getContext());
                                   ^
      server/src/main/java/org/apache/calcite/avatica/server/SubjectPreservingPrivilegedThreadFactory.java:46: warning: [removal] <T>doAs(Subject,PrivilegedAction<T>) in Subject has been deprecated and marked for removal
              return Subject.doAs(subject, new PrivilegedAction<Thread>() {
                            ^
        where T is a type-variable:
          T extends Object declared in method <T>doAs(Subject,PrivilegedAction<T>)
      server/src/main/java/org/apache/calcite/avatica/server/SubjectPreservingPrivilegedThreadFactory.java:44: warning: [removal] AccessController in java.security has been deprecated and marked for removal
          return AccessController.doPrivileged(new PrivilegedAction<Thread>() {
      

      I believe these warnings were introduced in CALCITE-5095.

      Must fix before 1.22. We can't allow broken windows in the build.

      Attachments

        Issue Links

          Activity

            People

              libenchao Benchao Li
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: