Skip to content

Commit

Permalink
Reuse Objects.toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Sep 20, 2023
1 parent 558fb5d commit 29d2073
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.commons.jexl3.internal;

import java.util.Iterator;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.function.Consumer;

Expand Down Expand Up @@ -1887,7 +1888,7 @@ protected Object visit(final ASTConstructorNode node, final Object data) {
}
return eval;
}
final String tstr = target != null ? target.toString() : "?";
final String tstr = Objects.toString(target, "?");
return unsolvableMethod(node, tstr, argv);
} catch (final JexlException.Method xmethod) {
throw xmethod;
Expand Down

0 comments on commit 29d2073

Please sign in to comment.