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

[8u] [macos] build failure in OpenJDK8u after JDK-8211301 in older xcode

XMLWordPrintable

        After backporting JDK-8211301 to OpenJDK8u build will fail when using old xcode versions (Xcode 6.3 on Mac 10.10):

        .../src/jdk/src/macosx/native/sun/awt/AWTWindow.m:1040:38: error: property 'frame' not found on object of type 'id'
                        nsWindow.contentView.frame = contentFrame;

        This is caused because old versions of the Cocoa ApplicationKit defined the contentView property as type id, even if according to the documentation, contentView would always be an NSView object. In the new AppKit, the contentView property of an NSWindow is defined as an NSView, so the problem will not appear.

        This can be fixed by casting the result of nsWindow.contentView to an NSView, for example:

                        NSView* view = nsWindow.contentView;
                        view.frame = contentFrame;

              alvdavi David Alvarez
              alvdavi David Alvarez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: