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.
The JavaSource.runModificationTask(), runWhenScanFinished() and runUserActionTask() never call the cancel method of the CancellableTask, so the implementor of such a CancellableTask just writes an empty cancel method. The compatible API change splits the CancellableTask into Task with run method and CancellableTask which extends the Task by cancel method. The JavaSource methods mentioned above take Task rather than CancellableTask. The CancellableTask is used only for tasks registered by factories.
Created attachment 43640 [details] Diff file
Created attachment 43641 [details] Fixed apichanges.xml diff
I agree with this change.
Checking in apichanges.xml; /cvs/java/source/apichanges.xml,v <-- apichanges.xml new revision: 1.12; previous revision: 1.11 done Checking in build.xml; /cvs/java/source/build.xml,v <-- build.xml new revision: 1.7; previous revision: 1.6 done Checking in src/org/netbeans/api/java/source/CancellableTask.java; /cvs/java/source/src/org/netbeans/api/java/source/CancellableTask.java,v <-- CancellableTask.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/api/java/source/JavaSource.java; /cvs/java/source/src/org/netbeans/api/java/source/JavaSource.java,v <-- JavaSource.java new revision: 1.62; previous revision: 1.61 done RCS file: /cvs/java/source/src/org/netbeans/api/java/source/Task.java,v done Checking in src/org/netbeans/api/java/source/Task.java; /cvs/java/source/src/org/netbeans/api/java/source/Task.java,v <-- Task.java initial revision: 1.1 done