Skip to content

Commit

Permalink
Attempt to correctly show model contexts with null ResourceShadowDisc…
Browse files Browse the repository at this point in the history
…riminator.
  • Loading branch information
mederly committed Oct 6, 2014
1 parent dbb0f1e commit 02accc6
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -95,10 +95,15 @@ public boolean correspondsTo(ProgressInformation newStatus) {
if (activityType != newStatus.getActivityType()) {
return false;
}
if (activityType == RESOURCE_OBJECT_OPERATION
&& (resourceShadowDiscriminator == null ||
!resourceShadowDiscriminator.equals(newStatus.getResourceShadowDiscriminator()))) {
return false;
if (activityType == RESOURCE_OBJECT_OPERATION) {
if (resourceShadowDiscriminator != null &&
!resourceShadowDiscriminator.equals(newStatus.getResourceShadowDiscriminator())) {
return false;
}
if (resourceShadowDiscriminator == null && newStatus.getResourceShadowDiscriminator() != null) {
// actually, we consider all resource-related records with null RSD to be equal (even if they deal with different resources)
return false;
}
}
return true;
}
Expand Down

0 comments on commit 02accc6

Please sign in to comment.