javax.swing.TransferHandler bugs?

Hi,

Ive been working with drag and drop and Transfer handler, and I noticed that inside the TransferHandler code, when the Drop operation occurs there are catche for a RuntimeExceptions that isnt passed on, so the drag and drop fails, but you are never made aware of why as it is never passed on, just consumed, now If I get some agreeance ill submit this as a bug, unless there is a good explination as to why they arent passed on.

examples follow

publicvoid drop(DropTargetDropEvent e){

TransferHandler importer =

((HasGetTransferHandler)component).getTransferHandler();

if (importer ==null){

e.rejectDrop();

cleanup(false);

return;

}

support.setDNDVariables(component, e);

boolean canImport = importer.canImport(support);

if (canImport){

e.acceptDrop(support.getDropAction());

boolean showLocation = support.showDropLocationIsSet ?

support.showDropLocation :

canImport;

setComponentDropLocation(showLocation ? support : null,false);

boolean success;

try{

success = importer.importData(support);

}catch (RuntimeException re){

success =false;

}

e.dropComplete(success);

cleanup(success);

}else{

e.rejectDrop();

cleanup(false);

}

}

Bot the try catch around success = importer.importData, I believe if there is an exception here, it should be rethrown, and no consumed, and it makes things extremely difficult when you have an exception during a drop, and you are never told.

[2426 byte] By [QWERTYa] at [2007-11-26 20:02:04]
# 1

> Hi,

>

> Ive been working with drag and drop and Transfer

> handler, and I noticed that inside the

> TransferHandler code, when the Drop operation occurs

> there are catche for a RuntimeExceptions that isnt

> passed on, so the drag and drop fails, but you are

> never made aware of why as it is never passed on,

> just consumed, now If I get some agreeance ill submit

> this as a bug, unless there is a good explination as

> to why they arent passed on.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6372479

Niceguy1a at 2007-7-9 23:01:01 > top of Java-index,Desktop,Core GUI APIs...