From c9fad36d16cc848c01449c371144b64a839182e1 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 27 Jul 2017 19:30:40 -0700 Subject: [PATCH] Fix bug causing an NPE when sqrt() was called. --- src/org/nwapw/abacus/plugin/StandardPlugin.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/org/nwapw/abacus/plugin/StandardPlugin.java b/src/org/nwapw/abacus/plugin/StandardPlugin.java index 8ac8a07..01b988e 100755 --- a/src/org/nwapw/abacus/plugin/StandardPlugin.java +++ b/src/org/nwapw/abacus/plugin/StandardPlugin.java @@ -6,9 +6,6 @@ import org.nwapw.abacus.number.NaiveNumber; import org.nwapw.abacus.number.NumberInterface; -import javax.print.attribute.standard.MediaSize; -import java.util.ArrayList; -import java.util.HashMap; import java.util.function.BiFunction; /** @@ -231,7 +228,7 @@ protected boolean matchesParams(NumberInterface[] params) { @Override protected NumberInterface applyInternal(NumberInterface[] params) { - return StandardPlugin.this.getFunction("pow").apply(params[0], (new NaiveNumber(0.5))); + return StandardPlugin.this.getOperator("^").getFunction().apply(params[0], (new NaiveNumber(0.5))); } }); }