Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed unreachable code #4

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: removed unreachable code
  • Loading branch information
JordenReuter committed Sep 6, 2024
commit a197efc5e1b0316261d0e76255dcb5d46addb32f
Original file line number Diff line number Diff line change
@@ -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) {
Original file line number Diff line number Diff line change
@@ -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;
@@ -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);
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>
Loading