Skip to content

Commit

Permalink
Fix typos in method name and Javadoc in OptionalVisitor.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo980 committed Oct 12, 2023
1 parent a8a3500 commit 55aa483
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private boolean isCallToGet(ExpressionTree expression) {
}

/**
* Returns true iff the method being callid is Optional creation: of, ofNullable.
* Returns true iff the method being called is Optional creation: of, ofNullable.
*
* @param methInvok a method invocation
* @return true iff the method being called is Optional creation: of, ofNullable
Expand All @@ -162,7 +162,7 @@ private boolean isOptionalCreation(MethodInvocationTree methInvok) {
* @return true iff the method being called is Optional elimination: get, orElse, orElseGet,
* orElseThrow
*/
private boolean isOptionalElimation(MethodInvocationTree methInvok) {
private boolean isOptionalElimination(MethodInvocationTree methInvok) {
ProcessingEnvironment env = checker.getProcessingEnvironment();
return TreeUtils.isMethodInvocation(methInvok, optionalGet, env)
|| TreeUtils.isMethodInvocation(methInvok, optionalOrElse, env)
Expand Down Expand Up @@ -333,7 +333,7 @@ public Void visitMethodInvocation(MethodInvocationTree tree, Void p) {
* @param tree a method invocation that can perhaps be simplified
*/
public void handleCreationElimination(MethodInvocationTree tree) {
if (!isOptionalElimation(tree)) {
if (!isOptionalElimination(tree)) {
return;
}
ExpressionTree receiver = TreeUtils.getReceiverTree(tree);
Expand Down

0 comments on commit 55aa483

Please sign in to comment.