Skip to content

Commit

Permalink
fix: removed unreachable code (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored Sep 6, 2024
1 parent 7132c3c commit 8de60a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ public PageResult<Bookmark> findBookmarksByCriteria(BookmarkSearchCriteria crite
addSearchStringPredicate(predicates, cb, root.get(Bookmark_.appId), criteria.getAppId());
addSearchStringPredicate(predicates, cb, root.get(Bookmark_.userId), ApplicationContext.get().getPrincipal());

if (!predicates.isEmpty()) {
cq.where(predicates.toArray(new Predicate[] {}));
}
cq.where(predicates.toArray(new Predicate[] {}));
cq.orderBy(cb.desc(root.get(AbstractTraceableEntity_.CREATION_DATE)));
return createPageQuery(cq, Page.of(criteria.getPageNumber(), criteria.getPageSize())).getPageResult();
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.tkit.onecx.bookmark.domain.daos.BookmarkDAO;
import org.tkit.onecx.bookmark.rs.internal.mappers.BookmarkMapper;
import org.tkit.onecx.bookmark.rs.internal.mappers.ExceptionMapper;
import org.tkit.quarkus.jpa.exceptions.ConstraintException;
import org.tkit.quarkus.log.cdi.LogService;

import gen.org.tkit.onecx.bookmark.rs.internal.BookmarksInternalApi;
Expand Down Expand Up @@ -79,11 +78,6 @@ public Response searchBookmarksByCriteria(BookmarkSearchCriteriaDTO bookmarkSear
return Response.ok(bookmarkMapper.mapPage(bookmarks)).build();
}

@ServerExceptionMapper
public RestResponse<ProblemDetailResponseDTO> exception(ConstraintException ex) {
return exceptionMapper.exception(ex);
}

@ServerExceptionMapper
public RestResponse<ProblemDetailResponseDTO> constraint(ConstraintViolationException ex) {
return exceptionMapper.constraint(ex);
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/data/test-internal.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<dataset>

<!-- HELP -->
<!-- BOOKMARK -->
<BOOKMARK guid="11-111" optlock="0" display_name="displayName1" workspace_name="workspaceName1" app_id="appId1" user_id="test-user" product_name="productName1" tenant_id="default"/>

</dataset>

0 comments on commit 8de60a7

Please sign in to comment.