OHLCPlugInViewFactory.java: allow int arg for interval

This commit is contained in:
2018-11-02 11:48:33 -07:00
parent 0d89384205
commit 36985bbfb0

View File

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