This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 65074 - RequestProcessor.getDefault() javadoc needs information about Task.cancel()
Summary: RequestProcessor.getDefault() javadoc needs information about Task.cancel()
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-24 20:10 UTC by pholthuizen
Modified: 2008-12-22 19:45 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
proposed patch v1 (extended the javadoc of method getDefault()) (1.57 KB, patch)
2005-09-24 20:12 UTC, pholthuizen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pholthuizen 2005-09-24 20:10:09 UTC
During my first time using the RequestProcessor class I stumbled over the fact
that tasks posted to the default request processor (getDefault()) can not be
canceled during their execution. I don't really know why the request processor
is designed this way, but in my opinion this information need to be included in
the javadoc of the request processor.

I include a patch extending the javadoc of the getDefault() method.

Sincerely,
Patrick Holthuizen
Comment 1 pholthuizen 2005-09-24 20:12:25 UTC
Created attachment 25142 [details]
proposed patch v1 (extended the javadoc of method getDefault())
Comment 2 Jaroslav Tulach 2005-12-07 18:01:58 UTC
Wrong category.  
Comment 3 Jaroslav Tulach 2005-12-07 18:03:27 UTC
Thanks for the patch, but the test is not really correct - you can call 
Task.cancel() and this may turn into Thread.interrupt() if the right 
constructor of the RequestProcessor is used. 
Comment 4 Jaroslav Tulach 2005-12-07 18:04:08 UTC
Do you still think your text shall be applied? If so, reopen. 
Comment 5 pholthuizen 2005-12-20 12:07:53 UTC
Dear jtulach,

I am not quite sure whether I get you right. You point out to use the proper 
constructor but that's exactly my point also. My goal is to direct a developer 
to use a contructor if the cancel() functionality is needed. That's why I 
think some additional information is needed in the docs of the getDefault() 
method.

Sincerely,
Patrick Holthuizen
Comment 6 Jaroslav Tulach 2005-12-20 15:32:26 UTC
Ok, now it makes sense to me. 
 
openide/util/src/org/openide/util/RequestProcessor.java,v  <--   
RequestProcessor.java  
new revision: 1.9; previous revision: 1.8