// Output it
while (it.hasNext()) {
Map.Entry<Field, Object> entry = it.next();
- this.getLogger().debug(MessageFormat.format("entry {0}={1}", entry.getKey(), entry.getValue()));
+ this.getLogger().debug(MessageFormat.format("entry {0}={1}", entry.getKey(), entry.getValue())); //NOI18N
}
}
@Override
public Object getPrintableValeFromSession (final HttpSession session, final String key) {
// Trace message
- this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED", session, key));
+ this.getLogger().trace(MessageFormat.format("session={0},key={1} - CALLED", session, key)); //NOI18N
// Are both parameter not null?
if (session == null) {
// Abort here
- throw new NullPointerException("session is null");
+ throw new NullPointerException("session is null"); //NOI18N
} else if (key == null) {
// Abort here
- throw new NullPointerException("key is null");
+ throw new NullPointerException("key is null"); //NOI18N
}
// Now get it
Object value = this.getValueFromSession(session, key);
// Debug message
- this.getLogger().debug(MessageFormat.format("value={0}", value));
+ this.getLogger().debug(MessageFormat.format("value={0}", value)); //NOI18N
// Trace message
- this.getLogger().trace(MessageFormat.format("Calling this.convertNullToEmpty({0}) ... - EXIT!", value));
+ this.getLogger().trace(MessageFormat.format("Calling this.convertNullToEmpty({0}) ... - EXIT!", value)); //NOI18N
// Return actual value
return this.convertNullToEmpty(value);
*/
@Override
public Product[] getProducts () {
- return (Product[]) this.products.values().toArray();
+ return this.products.values().toArray(new Product[this.products.size()]);
}
/**
// Mark it as ordered by setting flag
this.getLogger().debug(MessageFormat.format("Marking product={0} as choosen.", product.getName())); //NOI18N
- this.setValueInSession(product, session, HTTP_PARAM_CHOOSE, "1");
+ this.setValueInSession(product, session, HTTP_PARAM_CHOOSE, "1"); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N