Indeed I know understand how this can happen. FTR here's the code resulting in this:
for (Map.Entry<RoleHint< ? >, ComponentEntry< ? >> entry : this.componentEntries.entrySet()) {
if (entry.getValue().instance == component) {
key = entry.getKey();
oldDescriptor = entry.getValue().descriptor;
break;
}
}
This code will not take the same path at each run. this.componentEntries is a ConcurrentHashMap and calling entrySet will not return a set with a defined order. This the "if" will sometimes match the first entry and thus break outside of the "for" loop and sometimes not, thus resulting either in full branch coverage for the "if" or not...
Thanks
-Vincent