Skip to content

Commit

Permalink
fixing changes from robo code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nmck257 committed Nov 12, 2024
1 parent cf7eb67 commit cf71b0d
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ private boolean inMethodCallChain() {

private J.MethodInvocation inheritSelectAfter(J.MethodInvocation method, Stack<Space> prefix) {
return (J.MethodInvocation) new JavaIsoVisitor<ExecutionContext>() {

@Override
public <T> @Nullable JRightPadded<T> visitRightPadded(@Nullable JRightPadded<T> right,
public <T> JRightPadded<T> visitRightPadded(@Nullable JRightPadded<T> right,
JRightPadded.Location loc,
ExecutionContext executionContext) {
JRightPadded.Location loc,
ExecutionContext executionContext) {
if (right == null) return null;
return prefix.isEmpty() ? right : right.withAfter(prefix.pop());
}
Expand All @@ -158,11 +157,10 @@ public <T> JRightPadded<T> visitRightPadded(@Nullable JRightPadded<T> right,

private Space getSelectAfter(J.MethodInvocation method) {
return new JavaIsoVisitor<List<Space>>() {

@Override
public <T> @Nullable JRightPadded<T> visitRightPadded(@Nullable JRightPadded<T> right,
public <T> JRightPadded<T> visitRightPadded(@Nullable JRightPadded<T> right,
JRightPadded.Location loc,
List<Space> selectAfter) {
JRightPadded.Location loc,
List<Space> selectAfter) {
if (selectAfter.isEmpty()) {
selectAfter.add(right == null ? Space.EMPTY : right.getAfter());
}
Expand Down

0 comments on commit cf71b0d

Please sign in to comment.