Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8066618

Fix deprecation warnings in jdk libraries

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:

      Description

      JDK-8066616 enabled deprecation warnings in the build and suppressed deprecation warnings at specific locations in source files. This issue is an umbrella issue containing a set of tasks that follow up on the above-mentioned issue.

      The fix for the previous issue added warnings suppression to source file locations as a quick fix to get the build to be warnings-free. These locations need to be revisited to understand whether the deprecation warnings that were suppressed are actionable.

      The subtasks were initially created on a module by module basis and contain lists of deprecation warnings from that module. The subtasks can be split up, rearranged, etc. as necessary to facilitate better handling of the workload.

      The warnings contain information about what deprecated API is used and the file and line number of the use site. However, the warnings were generated a few years ago, so it might be difficult to trace the use site mentioned in each warning in the subtask to current location of that use site. A suggested procedure dealing with this situation is as follows:

      1) For each source file listed in the subtask, comment out the @SuppressWarnings("deprecation") annotation.

      2) Compile with a command like

              make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"

      and capture the output in a log file. (This exact command might not work. To adjust the javac flags used in the build, look in the file $ROOT/make/common/SetupJavaCompilers.gmk)

      3) For each warning issued, assess the deprecated API being warned about, and determine a plan for handling it. In some cases, code should be migrated to use a different API. In other cases, there may be no choice but to leave the warning suppressed.

      4) If there are code changes, follow the usual JDK procedure for building, testing, reviewing, etc. and push the changeset using the subtask's issue ID. If there are no code changes (meaning it's proper to suppress the deprecation warnings) then close the subtask as Not an Issue and add a note to document the results of the analysis.

        Attachments

          Issue Links

          1.
          Fix deprecation warnings in java.util.jar Sub-task Resolved Roger Riggs  
          2.
          Fix deprecation warnings in java.desktop module Sub-task Open Sergey Bylokhov  
          3.
          Fix deprecation warnings in java.rmi module Sub-task Resolved Stuart Marks  
          4.
          Fix deprecation warnings in java.management module Sub-task Resolved Amit Sapre  
          5.
          Fix deprecation warnings in the jdk.jvmstat and jdk.jdi modules Sub-task Open Unassigned  
          6.
          Fix deprecation warnings in jdk.crypto module Sub-task Open Jamil Nimeh  
          7.
          Fix deprecation warnings in jdk.naming module Sub-task Resolved Pavel Rappo  
          8.
          Fix deprecation warnings in jdk.zipfs module Sub-task Resolved Xueming Shen  
          9.
          Fix mac-specific deprecation warnings in the java.desktop module Sub-task Resolved Sergey Bylokhov  
          10.
          Fix solaris-specific deprecation warnings in the jdk.crypto.ucrypto module Sub-task Open Jamil Nimeh  
          11.
          Fix windows-specific deprecation warnings in the java.desktop module Sub-task Resolved Sergey Bylokhov  
          12.
          Fix deprecation warnings in Java Flight Recorder Sub-task Resolved Erik Gahlin  
          13.
          Fix deprecation warnings in java.base module - CRC32C Sub-task Resolved Staffan Friberg (Inactive)  
          14.
          Fix windows-specific deprecation warnings in the jdk.crypto.mscapi module Sub-task Closed Vincent Ryan  
          15.
          Fix deprecation warnings in jdk.deploy.osx module Sub-task Resolved Adam Petcher (Inactive)  
          16.
          Fix deprecation warning in oracle.accessbridge Sub-task Open Unassigned  
          17.
          Fix deprecation warnings in jdk.rmic module Sub-task Open Unassigned  
          18.
          Fix deprecation warnings in javax.crypto Sub-task Open Unassigned  
          19.
          Fix deprecation warnings in javax.net.ssl Sub-task Open Xue-Lei Fan  

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: