src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java
Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:
@@ -87,16 +87,16 @@
structure. */
long ctxt = getNativeDragContext();
/* If the event was not consumed, send a response to the source. */
try {
if (ctxt != 0 && !e.isConsumed()) {
- Iterator dropTargetProtocols =
+ Iterator<XDropTargetProtocol> dropTargetProtocols =
XDragAndDropProtocols.getDropTargetProtocols();
while (dropTargetProtocols.hasNext()) {
XDropTargetProtocol dropTargetProtocol =
- (XDropTargetProtocol)dropTargetProtocols.next();
+ dropTargetProtocols.next();
if (dropTargetProtocol.sendResponse(ctxt, e.getID(),
returnValue)) {
break;
}
}
@@ -114,16 +114,16 @@
structure. */
long ctxt = getNativeDragContext();
if (ctxt != 0) {
try {
- Iterator dropTargetProtocols =
+ Iterator<XDropTargetProtocol> dropTargetProtocols =
XDragAndDropProtocols.getDropTargetProtocols();
while (dropTargetProtocols.hasNext()) {
XDropTargetProtocol dropTargetProtocol =
- (XDropTargetProtocol)dropTargetProtocols.next();
+ dropTargetProtocols.next();
if (dropTargetProtocol.sendDropDone(ctxt, success,
dropAction)) {
break;
}
}
@@ -138,16 +138,16 @@
/* The native context is the pointer to the XClientMessageEvent
structure. */
long ctxt = getNativeDragContext();
if (ctxt != 0) {
- Iterator dropTargetProtocols =
+ Iterator<XDropTargetProtocol> dropTargetProtocols =
XDragAndDropProtocols.getDropTargetProtocols();
while (dropTargetProtocols.hasNext()) {
XDropTargetProtocol dropTargetProtocol =
- (XDropTargetProtocol)dropTargetProtocols.next();
+ dropTargetProtocols.next();
// getData throws IAE if ctxt is not for this protocol.
try {
return dropTargetProtocol.getData(ctxt, format);
} catch (IllegalArgumentException iae) {
}
@@ -219,16 +219,15 @@
return false;
}
public void forwardEventToEmbedded(long embedded, long ctxt,
int eventID) {
- Iterator dropTargetProtocols =
+ Iterator<XDropTargetProtocol> dropTargetProtocols =
XDragAndDropProtocols.getDropTargetProtocols();
while (dropTargetProtocols.hasNext()) {
- XDropTargetProtocol dropTargetProtocol =
- (XDropTargetProtocol)dropTargetProtocols.next();
+ XDropTargetProtocol dropTargetProtocol = dropTargetProtocols.next();
if (dropTargetProtocol.forwardEventToEmbedded(embedded, ctxt,
eventID)) {
break;
}
}