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();