* RHQ-1631, make the latest availability dot match the current availability IF desired by the user
* note: this must occur AFTER reversing the collection so the last dot refers to the most recent time slice
*/
if (withCurrentAvailability) {
AvailabilityPoint oldFirstAvailabilityPoint = availabilityPoints.remove(availabilityPoints.size() - 1);
AvailabilityType newFirstAvailabilityType = oldFirstAvailabilityPoint.getAvailabilityType();
if (context.type == EntityContext.Type.Resource) {
newFirstAvailabilityType = getCurrentAvailabilityTypeForResource(subject, context.resourceId);
} else if (context.type == EntityContext.Type.ResourceGroup) {
ResourceGroupComposite composite = resourceGroupManager.getResourceGroupComposite(subject,