Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hhund committed Dec 16, 2024
1 parent 56d6943 commit 7c8ce81
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private Consumer<Command> execute(Map<String, IdType> idTranslationTable, Connec

if (e instanceof PSQLException s && PSQLState.UNIQUE_VIOLATION.getState().equals(s.getSQLState()))
caughtExceptions.put(command.getIndex(),
new WebApplicationException(responseGenerator.dupicateResourceExists()));
new WebApplicationException(responseGenerator.duplicateResourceExists()));
else
caughtExceptions.put(command.getIndex(), e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Bundle execute() throws WebApplicationException

if (e instanceof PSQLException s
&& PSQLState.UNIQUE_VIOLATION.getState().equals(s.getSQLState()))
e = new WebApplicationException(e, responseGenerator.dupicateResourceExists());
e = new WebApplicationException(e, responseGenerator.duplicateResourceExists());

try
{
Expand Down Expand Up @@ -198,7 +198,7 @@ public Bundle execute() throws WebApplicationException
connection.rollback();

if (PSQLState.UNIQUE_VIOLATION.getState().equals(e.getSQLState()))
throw new WebApplicationException(responseGenerator.dupicateResourceExists());
throw new WebApplicationException(responseGenerator.duplicateResourceExists());
else
throw e;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,15 @@ public Response multipleExists(String resourceTypeName, String ifNoneExistsHeade
return Response.status(Status.PRECONDITION_FAILED).entity(outcome).build();
}

public Response dupicateResourceExists()
public Response duplicateResourceExists()
{
logger.warn("Duplicate resources exists");

OperationOutcome outcome = createOutcome(IssueSeverity.ERROR, IssueType.DUPLICATE, "Duplicate resources exist");
return Response.status(Status.FORBIDDEN).entity(outcome).build();
}

public Response dupicateResourceExists(String resourceTypeName)
public Response duplicateResourceExists(String resourceTypeName)
{
logger.warn("Duplicate {} resources exists", resourceTypeName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public Response create(R resource, UriInfo uri, HttpHeaders headers)
connection.rollback();

if (PSQLState.UNIQUE_VIOLATION.getState().equals(e.getSQLState()))
throw new WebApplicationException(responseGenerator.dupicateResourceExists(resourceTypeName));
throw new WebApplicationException(responseGenerator.duplicateResourceExists(resourceTypeName));
else
throw e;
}
Expand Down Expand Up @@ -535,7 +535,7 @@ public Response update(String id, R resource, UriInfo uri, HttpHeaders headers)
{
if (PSQLState.UNIQUE_VIOLATION.getState().equals(e.getSQLState()))
throw new WebApplicationException(
responseGenerator.dupicateResourceExists(resourceTypeName));
responseGenerator.duplicateResourceExists(resourceTypeName));

connection.rollback();
throw e;
Expand Down

0 comments on commit 7c8ce81

Please sign in to comment.