// product should not be null
if (null == product) {
// Abort here
- throw new NullPointerException("product is null");
+ throw new NullPointerException("product is null"); //NOI18N
}
// Generate item instance
// item must not be null
if (null == item) {
// Abort here
- throw new NullPointerException("item is null");
+ throw new NullPointerException("item is null"); //NOI18N
}
// Default value
// item shall not be null
if (null == item) {
// Abort here
- throw new NullPointerException("item is null");
+ throw new NullPointerException("item is null"); //NOI18N
}
// Default is not found
// product should not be null
if (null == product) {
// Abort here
- throw new NullPointerException("product is null");
+ throw new NullPointerException("product is null"); //NOI18N
}
// Initial value is zero
// Is this product instance and same?
if (null == item) {
// item is null
- throw new NullPointerException("item is null");
+ throw new NullPointerException("item is null"); //NOI18N
} else if ((item.isProductType()) && (item.getItemProduct().equals(product))) {
// Found it
itemAmount = item.getOrderedAmount();
// Is all set?
if (null == event) {
// Throw NPE
- throw new NullPointerException("event is null");
- } else if (event.getCustomer() == null) {
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getWrapper() == null) {
// Throw NPE again
- throw new NullPointerException("event.customer is null");
- } else if (event.getCustomer().getCustomerId() == null) {
+ throw new NullPointerException("event.wrapper is null"); //NOI18N
+ } else if (event.getWrapper().getCustomer() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.wrapper.customer is null"); //NOI18N
+ } else if (event.getWrapper().getCustomer().getCustomerId() == null) {
// Throw NPE again ...
- throw new NullPointerException("event.customer.customerId is null");
- } else if (event.getCustomer().getCustomerId() < 0) {
+ throw new NullPointerException("event.wrapper.customer.customerId is null"); //NOI18N
+ } else if (event.getWrapper().getCustomer().getCustomerId() < 0) {
// Invalid id
- throw new IllegalArgumentException(MessageFormat.format("event.customer.customerId={0} is not valid.", event.getCustomer().getCustomerId()));
+ throw new IllegalArgumentException(MessageFormat.format("event.wrapper.customer.customerId={0} is not valid.", event.getWrapper().getCustomer().getCustomerId())); //NOI18N
+ } else if (event.getWrapper().getList() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.wrapper.list is null"); //NOI18N
+ } else if (event.getWrapper().getList().isEmpty()) {
+ // Throw NPE again
+ throw new IllegalArgumentException("event.wrapper.list is empty"); //NOI18N
}
// Clear this method