|
|
@@ -73,12 +73,12 @@ public final class Cargo implements Entity<Cargo> {
|
|
73
|
73
|
}
|
|
74
|
74
|
|
|
75
|
75
|
/**
|
|
76
|
|
- * @param destination the new destination. May not be null.
|
|
|
76
|
+ * @param newDestination the new destination. May not be null.
|
|
77
|
77
|
*/
|
|
78
|
|
- public void setDestination(final Location destination) {
|
|
79
|
|
- Validate.notNull(destination);
|
|
|
78
|
+ public void changeDestination(final Location newDestination) {
|
|
|
79
|
+ Validate.notNull(newDestination);
|
|
80
|
80
|
|
|
81
|
|
- this.destination = destination;
|
|
|
81
|
+ this.destination = newDestination;
|
|
82
|
82
|
}
|
|
83
|
83
|
|
|
84
|
84
|
/**
|
|
|
@@ -167,7 +167,7 @@ public final class Cargo implements Entity<Cargo> {
|
|
167
|
167
|
final HandlingEvent lastEvent = deliveryHistory().lastEvent();
|
|
168
|
168
|
if (lastEvent == null) {
|
|
169
|
169
|
return false;
|
|
170
|
|
- } else {
|
|
|
170
|
+ } else {
|
|
171
|
171
|
return !itinerary().isExpected(lastEvent);
|
|
172
|
172
|
}
|
|
173
|
173
|
}
|