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

Need to suppress newly added unchecked cast and conversion in Swing code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • None
    • client-libs

    Backports

      Description

        javac in JDK 9 is now treating unchecked casts and conversions as errors. These need to be suppressed or we can't build.

        client/jdk/src/share/classes/javax/swing/JLayer.java:653: warning: [unchecked] unchecked cast
                view = (V) f.get("view", null);
                                ^
          required: V
          found: Object
          where V is a type-variable:
            V extends Component declared in class JLayer
        error: warnings found and -Werror specified
        client/jdk/src/share/classes/javax/swing/text/AbstractDocument.java:1434: warning: [unchecked] unchecked conversion
                documentProperties = (Dictionary) f.get("documentProperties", null);
                                     ^
          required: Dictionary<Object,Object>
          found: Dictionary

        Attachments

          Issue Links

            Activity

              People

                prr Philip Race
                prr Philip Race
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: