Skip to content

Commit

Permalink
Minor cleanup in AccessPathElement
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Oct 18, 2023
1 parent 5355c7c commit b4c07e4
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.collect.ImmutableList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
import javax.lang.model.element.Element;

Expand Down Expand Up @@ -31,18 +32,12 @@ public Element getJavaElement() {
return this.javaElement;
}

public @Nullable ImmutableList<String> getConstantArguments() {
return this.constantArguments;
}

@Override
public boolean equals(Object obj) {
if (obj instanceof AccessPathElement) {
AccessPathElement otherNode = (AccessPathElement) obj;
return this.javaElement.equals(otherNode.javaElement)
&& (constantArguments == null
? otherNode.constantArguments == null
: constantArguments.equals(otherNode.constantArguments));
&& Objects.equals(constantArguments, otherNode.constantArguments);
} else {
return false;
}
Expand Down

0 comments on commit b4c07e4

Please sign in to comment.