On Sat, 13 Feb 2021 05:31:18 GMT, Pankaj Bansal <pban...@openjdk.org> wrote:
>> Alexander Zuev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Internal variable eliminated. > > src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/RadiobuttonAccessibility.h > line 35: > >> 33: >> 34: }; >> 35: - (id)accessibilityValue; > > The NSAccessibilityRadioButton protocol has NSNumber as return type. Is it > fine to return id? I know id will be NSNumber pointer, but should not we make > it clear that NSNumber is supposed to be returned? No, it's Ok to return id here just to avoid type cast. > src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/RadiobuttonAccessibility.m > line 39: > >> 37: AWT_ASSERT_APPKIT_THREAD; >> 38: id value = [self accessibilityValueAttribute]; >> 39: return value; > > Why to create value variable? Can we just do "return [self > accessibilityValueAttribute];" Ah, that was a leftover from the debugging, i tried to return different types. Can be eliminated. ------------- PR: https://git.openjdk.java.net/jdk/pull/2561