Merge "Issue #189 fix for derived parameters when requested times are not available" into Unified_Grid
Former-commit-id: 06d5e4d77404c52271daa922b71d7c66e3036276
This commit is contained in:
commit
fc0fe05c94
2 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.uf.viz.derivparam.inv;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
@ -115,6 +116,10 @@ public class MetadataContainer {
|
|||
private Set<AbstractRequestableData> getData(AbstractRequestableNode node,
|
||||
Set<TimeAndSpace> availability, boolean doRequests)
|
||||
throws VizException {
|
||||
if (availability == null || availability.isEmpty()) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
if (dataCache.containsKey(node)) {
|
||||
return dataCache.get(node);
|
||||
}
|
||||
|
|
|
@ -308,6 +308,9 @@ public class DerivedLevelNode extends AbstractDerivedDataNode {
|
|||
Map<DerivParamField, Set<TimeAndSpace>> availCache = this.availCache;
|
||||
availability = matcher.match(availability, availCache.get(null))
|
||||
.keySet();
|
||||
if (availability.isEmpty()) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
Map<TimeAndSpace, DerivedParameterRequest> mapOfRequests = new HashMap<TimeAndSpace, DerivedParameterRequest>(
|
||||
availability.size());
|
||||
List<DerivedRequestableData> initResponses = new ArrayList<DerivedRequestableData>(
|
||||
|
|
Loading…
Add table
Reference in a new issue