[Bug #943] Temporal fix, LOG error instead of launching exception
FEA: ItEr73S04BugFixing
This commit is contained in:
parent
6a56c88f11
commit
78fc9ba51e
1 changed files with 7 additions and 2 deletions
|
|
@ -39,6 +39,8 @@ import java.util.Map.Entry;
|
|||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.hibernate.validator.Min;
|
||||
import org.hibernate.validator.NotNull;
|
||||
import org.joda.time.LocalDate;
|
||||
|
|
@ -78,6 +80,8 @@ import org.navalplanner.business.workingday.ResourcesPerDay;
|
|||
public abstract class ResourceAllocation<T extends DayAssignment> extends
|
||||
BaseEntity {
|
||||
|
||||
private static final Log LOG = LogFactory.getLog(ResourceAllocation.class);
|
||||
|
||||
public static <T extends ResourceAllocation<?>> List<T> getSatisfied(
|
||||
Collection<T> resourceAllocations) {
|
||||
Validate.notNull(resourceAllocations);
|
||||
|
|
@ -241,8 +245,9 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
|
|||
List<ResourcesPerDayModification> allocations) {
|
||||
for (ResourcesPerDayModification r : allocations) {
|
||||
if (isZero(r.getGoal().getAmount())) {
|
||||
throw new IllegalArgumentException(
|
||||
"all resources per day must be no zero");
|
||||
// FIXME: Temporal fix for bug 943, log error instead of
|
||||
// launching exception
|
||||
LOG.error("all resources per day must be no zero");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue