Skip to content

Commit

Permalink
Refine examples
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermarc committed Mar 22, 2024
1 parent a46ccb2 commit ea1579d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ public class CdsElementEqualsRules {
public static class SetTenantToSystemUser {

@BeforeTemplate
public boolean useObjectIdentity(CdsElement e1, CdsElement e2) {
public boolean useObjectIdentity(Object e1, CdsElement e2) {
return e1 == e2;
}

@BeforeTemplate
public boolean useObjectIdentity2(CdsElement e1, Object e2) {
return e1 == e2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public MethodInvocation visitMethodInvocation(MethodInvocation method,
if (matcher.matches(m)) {
m = m.withArguments(ListUtils.map(m.getArguments(), a -> {
if (a instanceof J.Literal && ((J.Literal) a).getType() == JavaType.Primitive.String) {
table.insertRow(p, new SelectColumns.Row((String) ((J.Literal) a).getValue()));
table.insertRow(p, new SelectStringColumns.Row((String) ((J.Literal) a).getValue()));
return SearchResult.found(a);
}
return a;
Expand Down

0 comments on commit ea1579d

Please sign in to comment.