public synchronized Product editProduct(Product product) {

		for (Product productAux : listProduct) {
			if (productAux.getCode() == product.getCode()) {
				listProduct.remove(productAux);
				try {
					listProduct.put(product);
				} catch (InterruptedException e) {
					e.printStackTrace();
				} catch (NullPointerException e) {
					e.getMessage();
				}
				logger.info("Product: " + product.getName() + " Code: "
						+ productAux.getCode() + " updated!");
				return product;
			}
		}

		logger.info("Product not found!");
		return null;
	}