diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/common/ConcurrentModificationDetector.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/common/ConcurrentModificationDetector.java deleted file mode 100644 index 84e40c1c8..000000000 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/common/ConcurrentModificationDetector.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of NavalPlan - * - * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e - * Desenvolvemento Tecnolóxico de Galicia - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package org.navalplanner.web.common; - -import org.navalplanner.web.common.ExceptionCatcherProxy.IExceptionHandler; -import org.springframework.dao.OptimisticLockingFailureException; - -public class ConcurrentModificationDetector { - - private ConcurrentModificationDetector() { - } - - public static T addAutomaticHandlingOfConcurrentModification(Class interfaceClass, - T model, final String backURL) { - IExceptionHandler handler = createHandler(backURL); - return ExceptionCatcherProxy.doCatchFor(interfaceClass).when( - OptimisticLockingFailureException.class, handler) - .applyTo(model); - } - - private static IExceptionHandler createHandler( - final String backURL) { - return new IExceptionHandler() { - - @Override - public void onException(OptimisticLockingFailureException exception) { - ConcurrentModificationController.showException(exception, - backURL); - } - }; - } - -} diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/resources/worker/WorkerCRUDController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/resources/worker/WorkerCRUDController.java index c3cce9297..c5264dc9c 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/resources/worker/WorkerCRUDController.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/resources/worker/WorkerCRUDController.java @@ -21,7 +21,6 @@ package org.navalplanner.web.resources.worker; import static org.navalplanner.web.I18nHelper._; -import static org.navalplanner.web.common.ConcurrentModificationDetector.addAutomaticHandlingOfConcurrentModification; import java.util.Date; import java.util.List; @@ -269,9 +268,6 @@ public class WorkerCRUDController extends GenericForwardComposer implements @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); - this.workerModel = addAutomaticHandlingOfConcurrentModification( - IWorkerModel.class, this.workerModel, - "/resources/worker/worker.zul"); localizationsForEditionController = createLocalizationsController(comp, "editWindow"); localizationsForCreationController = createLocalizationsController(