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

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

XMLWordPrintable

    • b18
    • generic
    • os_x

        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;

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

                Created:
                Updated:
                Resolved: