Fix injection for unit tests

This commit is contained in:
René Pfeuffer
2018-10-26 14:54:55 +02:00
parent 9279bfca5f
commit 22069914b0
10 changed files with 36 additions and 30 deletions

View File

@@ -1,13 +1,16 @@
package sonia.scm.api.rest;
import sonia.scm.AlreadyExistsException;
import sonia.scm.api.v2.resources.ExceptionWithContextToErrorDtoMapper;
import javax.inject.Inject;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.Provider;
@Provider
public class AlreadyExistsExceptionMapper extends ContextualExceptionMapper<AlreadyExistsException> {
public AlreadyExistsExceptionMapper() {
super(AlreadyExistsException.class, Status.CONFLICT);
@Inject
public AlreadyExistsExceptionMapper(ExceptionWithContextToErrorDtoMapper mapper) {
super(AlreadyExistsException.class, Status.CONFLICT, mapper);
}
}