--- old/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m 2017-07-20 12:42:10.000000000 -0700 +++ new/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m 2017-07-20 12:42:10.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -770,11 +770,9 @@ CDragSource *dragSource = self._dragSource; NSDragOperation dragOp = NSDragOperationNone; - if (dragSource != nil) + if (dragSource != nil) { dragOp = [dragSource draggingSourceOperationMaskForLocal:flag]; - else if ([super respondsToSelector:@selector(draggingSourceOperationMaskForLocal:)]) - dragOp = [super draggingSourceOperationMaskForLocal:flag]; - + } return dragOp; } @@ -784,11 +782,9 @@ CDragSource *dragSource = self._dragSource; NSArray* array = nil; - if (dragSource != nil) + if (dragSource != nil) { array = [dragSource namesOfPromisedFilesDroppedAtDestination:dropDestination]; - else if ([super respondsToSelector:@selector(namesOfPromisedFilesDroppedAtDestination:)]) - array = [super namesOfPromisedFilesDroppedAtDestination:dropDestination]; - + } return array; } @@ -797,10 +793,9 @@ // If draggingSource is nil route the message to the superclass (if responding to the selector): CDragSource *dragSource = self._dragSource; - if (dragSource != nil) + if (dragSource != nil) { [dragSource draggedImage:image beganAt:screenPoint]; - else if ([super respondsToSelector:@selector(draggedImage::)]) - [super draggedImage:image beganAt:screenPoint]; + } } - (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation @@ -808,10 +803,9 @@ // If draggingSource is nil route the message to the superclass (if responding to the selector): CDragSource *dragSource = self._dragSource; - if (dragSource != nil) + if (dragSource != nil) { [dragSource draggedImage:image endedAt:screenPoint operation:operation]; - else if ([super respondsToSelector:@selector(draggedImage:::)]) - [super draggedImage:image endedAt:screenPoint operation:operation]; + } } - (void)draggedImage:(NSImage *)image movedTo:(NSPoint)screenPoint @@ -819,10 +813,9 @@ // If draggingSource is nil route the message to the superclass (if responding to the selector): CDragSource *dragSource = self._dragSource; - if (dragSource != nil) + if (dragSource != nil) { [dragSource draggedImage:image movedTo:screenPoint]; - else if ([super respondsToSelector:@selector(draggedImage::)]) - [super draggedImage:image movedTo:screenPoint]; + } } - (BOOL)ignoreModifierKeysWhileDragging @@ -831,11 +824,9 @@ CDragSource *dragSource = self._dragSource; BOOL result = FALSE; - if (dragSource != nil) + if (dragSource != nil) { result = [dragSource ignoreModifierKeysWhileDragging]; - else if ([super respondsToSelector:@selector(ignoreModifierKeysWhileDragging)]) - result = [super ignoreModifierKeysWhileDragging]; - + } return result; } @@ -849,11 +840,9 @@ CDropTarget *dropTarget = self._dropTarget; NSDragOperation dragOp = NSDragOperationNone; - if (dropTarget != nil) + if (dropTarget != nil) { dragOp = [dropTarget draggingEntered:sender]; - else if ([super respondsToSelector:@selector(draggingEntered:)]) - dragOp = [super draggingEntered:sender]; - + } return dragOp; } @@ -863,11 +852,9 @@ CDropTarget *dropTarget = self._dropTarget; NSDragOperation dragOp = NSDragOperationNone; - if (dropTarget != nil) + if (dropTarget != nil) { dragOp = [dropTarget draggingUpdated:sender]; - else if ([super respondsToSelector:@selector(draggingUpdated:)]) - dragOp = [super draggingUpdated:sender]; - + } return dragOp; } @@ -876,10 +863,9 @@ // If draggingDestination is nil route the message to the superclass: CDropTarget *dropTarget = self._dropTarget; - if (dropTarget != nil) + if (dropTarget != nil) { [dropTarget draggingExited:sender]; - else if ([super respondsToSelector:@selector(draggingExited:)]) - [super draggingExited:sender]; + } } - (BOOL)prepareForDragOperation:(id )sender @@ -888,11 +874,9 @@ CDropTarget *dropTarget = self._dropTarget; BOOL result = FALSE; - if (dropTarget != nil) + if (dropTarget != nil) { result = [dropTarget prepareForDragOperation:sender]; - else if ([super respondsToSelector:@selector(prepareForDragOperation:)]) - result = [super prepareForDragOperation:sender]; - + } return result; } @@ -902,11 +886,9 @@ CDropTarget *dropTarget = self._dropTarget; BOOL result = FALSE; - if (dropTarget != nil) + if (dropTarget != nil) { result = [dropTarget performDragOperation:sender]; - else if ([super respondsToSelector:@selector(performDragOperation:)]) - result = [super performDragOperation:sender]; - + } return result; } @@ -915,10 +897,9 @@ // If draggingDestination is nil route the message to the superclass: CDropTarget *dropTarget = self._dropTarget; - if (dropTarget != nil) + if (dropTarget != nil) { [dropTarget concludeDragOperation:sender]; - else if ([super respondsToSelector:@selector(concludeDragOperation:)]) - [super concludeDragOperation:sender]; + } } - (void)draggingEnded:(id )sender @@ -926,10 +907,9 @@ // If draggingDestination is nil route the message to the superclass: CDropTarget *dropTarget = self._dropTarget; - if (dropTarget != nil) + if (dropTarget != nil) { [dropTarget draggingEnded:sender]; - else if ([super respondsToSelector:@selector(draggingEnded:)]) - [super draggingEnded:sender]; + } } /******************************** END NSDraggingDestination Interface ********************************/