Skip to content

Commit

Permalink
More @nonnull
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestPessimist committed Oct 18, 2019
1 parent 911021e commit 51f857a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,18 @@ public String getShipperGatewayId()
return DhlConstants.SHIPPER_GATEWAY_ID;
}

@NonNull
@Override
public ITableRecordReference toTableRecordReference(final DeliveryOrder deliveryOrder)
public ITableRecordReference toTableRecordReference(@NonNull final DeliveryOrder deliveryOrder)
{
final int deliveryOrderRepoId = deliveryOrder.getRepoId();
Check.assume(deliveryOrderRepoId > 0, "deliveryOrderRepoId > 0 for {}", deliveryOrder);
return TableRecordReference.of(I_DHL_ShipmentOrderRequest.Table_Name, deliveryOrderRepoId);
}

@NonNull
@Override
public DeliveryOrder getByRepoId(final DeliveryOrderId deliveryOrderRepoId)
public DeliveryOrder getByRepoId(@NonNull final DeliveryOrderId deliveryOrderRepoId)
{
final I_DHL_ShipmentOrderRequest dhlShipmentOrderRequest = InterfaceWrapperHelper.load(deliveryOrderRepoId, I_DHL_ShipmentOrderRequest.class);
Check.assumeNotNull(dhlShipmentOrderRequest, "DHL delivery order must exist for ID={}", deliveryOrderRepoId);
Expand All @@ -91,6 +93,7 @@ public DeliveryOrder getByRepoId(final DeliveryOrderId deliveryOrderRepoId)
* - I_DHL_ShipmentOrderRequest is the persisted object for that DTO with data relevant for DHL.
* Each different shipper has its own "shipper-PO" with its own relevant data.
*/
@NonNull
@Override
public DeliveryOrder save(@NonNull final DeliveryOrder deliveryOrder)
{
Expand Down

0 comments on commit 51f857a

Please sign in to comment.