Bug 540950 - [codemining] Setting new code mining providers can lead former ones to exception
Summary: [codemining] Setting new code mining providers can lead former ones to exception
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.10 M3   Edit
Assignee: Angelo ZERR CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 529127
  Show dependency tree
 
Reported: 2018-11-09 03:18 EST by Angelo ZERR CLA
Modified: 2018-11-16 10:03 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo ZERR CLA 2018-11-09 03:18:57 EST
Today when code mining manager when new codemining provider are set (ex: when user changed some codemining preferences in JDT CodeMining), the old code mining manager is not uninstalled and sometimes old code mining provider are processes although there were disposed.

It causes 

To clean this behviour, we need to uninstall the old code mining manager before creating a new code mining manager.

And we can have some trouble like:

------------------------------------------------------
java.util.concurrent.CompletionException: org.eclipse.core.runtime.AssertionFailedException: null argument:
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:283)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1603)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.getEditorInputJavaElement(EditorUtility.java:450)
	at org.eclipse.jdt.internal.ui.javaeditor.codemining.JavaElementCodeMiningProvider.lambda$0(JavaElementCodeMiningProvider.java:78)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	... 4 more
------------------------------------------------------

See https://git.eclipse.org/r/#/c/126847/
Comment 1 Eclipse Genie CLA 2018-11-09 03:21:26 EST
New Gerrit change created: https://git.eclipse.org/r/132166
Comment 3 Mickael Istria CLA 2018-11-16 10:03:11 EST
This patch should fix it. Thanks Angelo!
Comment 4 Angelo ZERR CLA 2018-11-16 10:03:44 EST
Thanks a lot @Mickael!