Skip to content

Commit

Permalink
gh-4594 Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
at055612 committed Dec 13, 2024
1 parent 909cc58 commit 1729973
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ private void setupColumns(final DocumentTypes documentTypes) {

// Effective Permission
dataGrid.addColumn(
DataGridUtil.textColumnBuilder((DocumentUserPermissions row) -> {
final DocumentPermission explicit = row.getPermission();
final DocumentPermission inherited = row.getInheritedPermission();
return GwtNullSafe.get(DocumentPermission.highest(explicit, inherited),
DocumentPermission::getDisplayValue);
})
DataGridUtil.textColumnBuilder(
(DocumentUserPermissions row) -> {
final DocumentPermission explicit = row.getPermission();
final DocumentPermission inherited = row.getInheritedPermission();
return GwtNullSafe.get(DocumentPermission.highest(explicit, inherited),
DocumentPermission::getDisplayValue);
})
.withSorting(DocumentPermissionFields.FIELD_EFFECTIVE_DOC_PERMISSION)
.build(),
DataGridUtil.headingBuilder("Effective Permission")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ private Object findBeforeOrAfterCallObj(Object resource, Object template) {

Optional<Method> fetchMethodOptional =
Arrays.stream(templateReadSupportingResource.getClass().getMethods())
.filter(m -> m.getName().equals("fetch")
&& m.getParameterCount() == 1
&& m.getParameters()[0].getType().isAssignableFrom(template.getClass()))
.filter(m ->
m.getName().equals("fetch")
&& m.getParameterCount() == 1
&& m.getParameters()[0].getType().isAssignableFrom(template.getClass()))
.findFirst();

if (fetchMethodOptional.isPresent()) {
Expand All @@ -178,9 +179,10 @@ private Object findBeforeOrAfterCallObj(Object resource, Object template) {

Optional<Method> findMethodOptional =
Arrays.stream(findWithCriteriaSupportingResource.getClass().getMethods())
.filter(m -> m.getName().equals("find")
&& m.getParameterCount() == 1
&& m.getParameters()[0].getType().isAssignableFrom(template.getClass()))
.filter(m ->
m.getName().equals("find")
&& m.getParameterCount() == 1
&& m.getParameters()[0].getType().isAssignableFrom(template.getClass()))
.findFirst();
if (findMethodOptional.isPresent()) {
ResultPage<Object> resultPage = findWithCriteriaSupportingResource.find(template);
Expand Down

0 comments on commit 1729973

Please sign in to comment.