From 55aa4839ddc463778ef8a46fb22aa11e1c908838 Mon Sep 17 00:00:00 2001 From: James Yoo <24359440+jyoo980@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:07:06 -0700 Subject: [PATCH] Fix typos in method name and Javadoc in `OptionalVisitor.java` --- .../checkerframework/checker/optional/OptionalVisitor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/checker/src/main/java/org/checkerframework/checker/optional/OptionalVisitor.java b/checker/src/main/java/org/checkerframework/checker/optional/OptionalVisitor.java index 826a62e605e..5482fadc090 100644 --- a/checker/src/main/java/org/checkerframework/checker/optional/OptionalVisitor.java +++ b/checker/src/main/java/org/checkerframework/checker/optional/OptionalVisitor.java @@ -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 @@ -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) @@ -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);