Implemented handling of concurrent modification of objects

based on lastModified date
This commit is contained in:
Philipp Czora
2018-08-29 10:39:29 +02:00
parent 19f2c88768
commit 05a7e6c587
13 changed files with 103 additions and 73 deletions

View File

@@ -0,0 +1,15 @@
package sonia.scm.api.rest;
import sonia.scm.ConcurrentModificationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
@Provider
public class ConcurrentModificationExceptionMapper implements ExceptionMapper<ConcurrentModificationException> {
@Override
public Response toResponse(ConcurrentModificationException exception) {
return Response.status(Response.Status.CONFLICT).build();
}
}