Issue #2154 Ensure all resource groups get removed from the time matcher.

Former-commit-id: 519d0f3ef8 [formerly f652fd3f3126f04c2ced9ceb027875a47ea23f51]
Former-commit-id: a7bfd8ee28
This commit is contained in:
Ben Steffensmeier 2013-07-03 14:41:27 -05:00
parent d883392d05
commit 808941ac45

View file

@ -77,7 +77,10 @@ import com.raytheon.uf.viz.core.time.TimeMatchingJob;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Aug 15, 2007 chammack Initial Creation. * Aug 15, 2007 chammack Initial Creation.
* Nov 30, 2007 461 bphillip Using VizTime now for time matching * Nov 30, 2007 461 bphillip Using VizTime now for time matching
* Oct 22, 2009 #3348 bsteffen added ability to limit number of frames * Oct 22, 2009 3348 bsteffen added ability to limit number of
* frames
* Jul 03, 2013 2154 bsteffen Ensure all resource groups get
* removed from the time matcher.
* </pre> * </pre>
* *
* @author chammack * @author chammack
@ -249,9 +252,15 @@ public abstract class AbstractDescriptor extends ResourceGroup implements
synchronized (timeManager) { synchronized (timeManager) {
timeMatchingMap.remove(resource); timeMatchingMap.remove(resource);
} }
if (resource.getResourceData() instanceof IResourceGroup) { ResourceList rl = null;
ResourceList rl = ((IResourceGroup) resource.getResourceData()) if (resource instanceof IResourceGroup) {
rl = ((IResourceGroup) resource)
.getResourceList(); .getResourceList();
} else if (resource.getResourceData() instanceof IResourceGroup) {
rl = ((IResourceGroup) resource.getResourceData())
.getResourceList();
}
if (rl != null) {
synchronized (rl) { synchronized (rl) {
for (ResourcePair rp : rl) { for (ResourcePair rp : rl) {
AbstractVizResource<?, ?> rsc = rp.getResource(); AbstractVizResource<?, ?> rsc = rp.getResource();