this.addressbookBean = (AddressbookSessionBeanRemote) context.lookup("java:global/addressbook-ejb/addressbook!org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote"); //NOI18N
} catch (final NamingException ex) {
// Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
}
}
this.loggerBeanLocal.logTrace(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N
// All accepted, required fields
- String[] requiredFileds = {"addressbookId"}; //NOI18N
+ String[] requiredFields = {"addressbookId"}; //NOI18N
// Pre-validation (example: not null, not a string, empty string ...)
- super.preValidate(context, component, value, requiredFileds, false);
+ super.preValidate(context, component, value, requiredFields, false);
// Cast to long
Long addressbookId = (Long) value;
addressbook = this.addressbookBean.getAddressbookById(addressbookId);
// Is it set?
- if (addressbook == null) {
+ if (null == addressbook) {
// Is null?!
throw new NullPointerException(MessageFormat.format("addressbook for id={0} is null", addressbookId)); //NOI18N
}