* {@inheritDoc}
*/
@Override
public void updateStock(@PathParam("id") long id, Stock stock) {
Stock current = stockMap.get(id);
if (current == null) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
// updates the stock
current.setName(stock.getName());
current.setCode(stock.getCode());
current.setDate(stock.getDate());
current.setValue(stock.getValue());
}