DESCRIPTION

Bug 297922: IllegalStateException in AbstractUIPlugin

Catch IllegalStateException for late started events if the current
plug-in was already stopped.

Change-Id: I26658a535e94d3d1149447436eb7dd5e186f73bb
Signed-off-by: Darwin Gaines xxx@xxx.xxx
Signed-off-by: Jayvion Booth xxx@xxx.xxx

COMMENTS

author: Jayvion Booth
date: 2016-07-18 20:41:45.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2016-07-18 20:41:51.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9921/

-------------------------------------
author: Darwin Gaines
date: 2016-07-18 20:47:38.000000000

Patch Set 5:

thank you for pushing again. i hope that wasted less of your time than i trying again alone. ;-)

-------------------------------------
author: Darwin Gaines
date: 2016-07-18 20:50:17.000000000

Patch Set 5:

i don't really know about the version numbers and in fact have no clue as how to verify. is there now other bug or change going into the same new version or is the 3rd version segment incremented for every change? does this have to be reviewed?

-------------------------------------
author: Jayvion Booth
date: 2016-07-18 20:52:00.000000000

Patch Set 5:

> i don't really know about the version numbers and in fact have no
 > clue as how to verify. is there now other bug or change going into
 > the same new version or is the 3rd version segment incremented for
 > every change? does this have to be reviewed?

You can't know, but here is the wiki:  https://wiki.eclipse.org/Version_Numbering#When_to_change_the_service_segment

-------------------------------------
author: Brenden Conley
date: 2016-07-18 21:03:31.000000000

Patch Set 5: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9921/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2016-07-18 21:04:01.000000000

Patch Set 5: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2016-07-18 21:04:10.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
author: Darwin Gaines
date: 2016-07-18 21:06:50.000000000

Patch Set 5:

you are certainly right about your considerations setting the listener to null. passing null to removeBundleListener would result in an exception and this would very well be possible as you wrote.

one possibility that comes into my mind is your latest version, not resetting the listener reference. it may be fine to attempt to remove it twice according to javadocs and not gc it before the AbstractUIPlugin instance is removed or restarted. this is certainly fine with me. is there any guideline expecting something else?

in order to make sure to reset bundleListener to null when it is removed i could think of a variant consisting of your new line in the listener and assigning it to a local variable in stop() before null-check there. but is that worth it?

the primary aim of the listener is to invoke refreshPluginActions which only happens after bundle start, may be never. it renders the plugin in an incompletely started state for an undefined amount of time. i don't know if there is any negative consequence from that. most probably not or someone would have found out. the current is 7 years old now which means we might not change too much only in order to make a warning disappear.

-------------------------------------
