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

Metal L&F has dependency on the Windows L&F

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: client-libs
    • Labels:

      Description

      I noticed Windows L&F being included in the 'rt.jar' for OS X and attempted to tell
      the build system not to build/include it there, but it turns out that Metal has a dependency

      Its in code 'that is only used on Windows' but nonetheless Metal won't compile unless
      this one class is there.

      Here's the error :

      jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java:431: error: cannot find symbol
                  return (FontUIResource)props[type].createValue(null);
                                                    ^
        symbol: method createValue(<null>)
        location: class MetalFontDesktopProperty

      This usage is in a static nested class called WindowsFontDelegate

      The problem is that MetalFontDesktopProperty extends com.sun.java.swing.plaf.windows.DesktopProperty

      We need to break this dependency so that Metal can unburden itself of all the rest of the Win L&F

        Attachments

          Activity

            People

            • Assignee:
              serb Sergey Bylokhov
              Reporter:
              prr Philip Race
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: