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

[macos] Nonsensical self == [super init] in CFileDialog.m

    Details

    • Subcomponent:
    • Resolved In Build:
      b18
    • CPU:
      generic
    • OS:
      os_x

      Backports

        Description

        A colleague reports that
        self == [super init]
        makes no sense in CFileDialog.m
        citing
        https://www.cocoawithlove.com/2009/04/what-does-it-mean-when-you-assign-super.html
        and suggests

        src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.m
        @@ -46,7 +46,7 @@
         canChooseDirectories:(BOOL)inChooseDirectories
                      withEnv:(JNIEnv*)env;
         {
        - if (self == [super init]) {
        + if (self = [super init]) {
                 fHasFileFilter = inHasFilter;
                 fFileDialog = JNFNewGlobalRef(env, inDialog);
                 fDirectory = inPath;

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  serb Sergey Bylokhov
                  Reporter:
                  martin Martin Buchholz
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: