<AWT Dev> [9] Review Request: 8141553 JDK fails to build with Xcode 7 on 10.11
Avik Niyogi
avik.niyogi at oracle.com
Thu Feb 25 05:09:52 UTC 2016
The updated fix looks good to me.
> On 24-Feb-2016, at 11:02 pm, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
>
> On 11.02.16 8:52, Avik Niyogi wrote:
>> Here is my two cents:
>>
>> * As of Xcode 7, Rich Text Font Document attributes have to be
>> mentioned explicitly and not with a nil.
>>
>> I can see that to mitigate the warning an empty array is placed
>> there. The system is able to still process RTF document with this.
>> Ideally, the parameter to be passed for the document attribute as
>> per my understanding is
>> *@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType}*
>> at line numbers 627 and 684 AWTView.m
>> Please refer to the below link for further clarification regarding
>> values to be passed (like NULL instead of nil):
>> https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/#//apple_ref/occ/instm/NSAttributedString/initWithRTFD:documentAttributes:
>
> Fixed. But I wonder why "RTFDFromRange" have this in the documentation:
> "If there are no document-level attributes, dict can be nil."
> https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/#//apple_ref/occ/instm/NSAttributedString/RTFDFromRange:documentAttributes: <https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/#//apple_ref/occ/instm/NSAttributedString/RTFDFromRange:documentAttributes:>
>
>>
>> * *performFileOperation* at line 224 is deprecated in OSX10.11.
>>
>> *recycleURLs:completionHandler:* should be used instead as far as it
>> is possible (until a good substitute for performFileOperation is
>> available)
>> https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/ <https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/>
>
> Unfortunately we cannot use recycleURLs, since it is asynchronous. I found another possible solution NSFileManager.trashItemAtURL():
> [1] https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/index.html#//apple_ref/occ/instm/NSFileManager/trashItemAtURL:resultingItemURL:error: <https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/index.html#//apple_ref/occ/instm/NSFileManager/trashItemAtURL:resultingItemURL:error:>
>
> New version:
> http://cr.openjdk.java.net/~serb/8141553/webrev.01 <http://cr.openjdk.java.net/~serb/8141553/webrev.01>
>
>>
>>
>> With Regards,
>> Avik Niyogi
>>
>>> On 10-Feb-2016, at 11:46 pm, Chris Bensen <chris.bensen at oracle.com <mailto:chris.bensen at oracle.com>
>>> <mailto:chris.bensen at oracle.com <mailto:chris.bensen at oracle.com>>> wrote:
>>>
>>>> On Feb 10, 2016, at 9:16 AM, David DeHaven <david.dehaven at oracle.com <mailto:david.dehaven at oracle.com>
>>>> <mailto:david.dehaven at oracle.com <mailto:david.dehaven at oracle.com>>> wrote:
>>>>
>>>>
>>>>> Please review one more iteration of the fix of warnings in awt on osx.
>>>>> The fix was contributed by Chris Bensen.
>>>>>
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8141553
>>>>> Webrev can be found at:
>>>>> http://cr.openjdk.java.net/~serb/8141553/webrev.00
>>>>
>>>> Thanks for doing this! I'm not a (R)eviewer, but I've been using
>>>> these changes for some time now with no ill effects.
>>>>
>>>> -DrD-
>>>
>>> +1
>>>
>>> Chris
>>
>
>
> --
> Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160225/f2ddf078/attachment.html>
More information about the awt-dev
mailing list