RFR: 8233955: VM crashes if more than one file are added to ClipboardContent via drag and drop [v5]

Lukasz Kostyra lkostyra at openjdk.org
Wed May 24 15:26:09 UTC 2023


On Wed, 24 May 2023 14:16:17 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Lukasz Kostyra has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   startDrag: move autorelease calls for NSStrings until after init
>
> modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m line 977:
> 
>> 975:             // create an image with contents of URL
>> 976:             NSString *fileURL = [[NSString alloc] initWithData:[pbItem dataForType:NSPasteboardTypeFileURL] encoding:NSUTF8StringEncoding];
>> 977:             [fileURL autorelease];
> 
> Minor: You could do this in a single line, although it is correct as you have it.
> 
> 
> NSString *fileURL = [[[NSString alloc] initWithData:[pbItem dataForType:NSPasteboardTypeFileURL] encoding:NSUTF8StringEncoding] autorelease];

I mostly separated it because I found it a bit cluttered and harder to read. I can combine these two though, no problem.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1089#discussion_r1204382927


More information about the openjfx-dev mailing list