From 36985bbfb098c6771bd08492a421f70f800a1dff Mon Sep 17 00:00:00 2001 From: Seth Ladygo Date: Fri, 2 Nov 2018 11:48:33 -0700 Subject: [PATCH] OHLCPlugInViewFactory.java: allow int arg for interval --- src/main/java/ats/plugin/OHLCPlugInViewFactory.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/ats/plugin/OHLCPlugInViewFactory.java b/src/main/java/ats/plugin/OHLCPlugInViewFactory.java index 8aa3001..004a831 100644 --- a/src/main/java/ats/plugin/OHLCPlugInViewFactory.java +++ b/src/main/java/ats/plugin/OHLCPlugInViewFactory.java @@ -67,21 +67,23 @@ public class OHLCPlugInViewFactory extends ViewFactorySupport { value = validatedNodes[4]; Class calcTypeClass = calcType.getForge().getEvaluationType(); - if ((calcTypeClass != String.class)) + if (calcTypeClass != String.class) { throw new ViewParameterException("OHLC view needs a String-typed calc type value for parameter 1"); } Class timeTypeClass = timeType.getForge().getEvaluationType(); - if ((timeTypeClass != String.class)) + if (timeTypeClass != String.class) { throw new ViewParameterException("OHLC view needs a String-typed time type value for parameter 2"); } Class intervalClass = interval.getForge().getEvaluationType(); - if ((intervalClass != String.class)) + if ((intervalClass != String.class) && + (intervalClass != Integer.class) && + (intervalClass != int.class)) { - throw new ViewParameterException("OHLC view needs String-typed interval value for parameter 3"); + throw new ViewParameterException("OHLC view needs String- or integer-typed interval value for parameter 3 - got " + intervalClass); } Class timestampClass = timestamp.getForge().getEvaluationType();