OHLCPlugInViewFactory.java: allow int arg for interval
This commit is contained in:
@ -67,21 +67,23 @@ public class OHLCPlugInViewFactory extends ViewFactorySupport {
|
|||||||
value = validatedNodes[4];
|
value = validatedNodes[4];
|
||||||
|
|
||||||
Class calcTypeClass = calcType.getForge().getEvaluationType();
|
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");
|
throw new ViewParameterException("OHLC view needs a String-typed calc type value for parameter 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
Class timeTypeClass = timeType.getForge().getEvaluationType();
|
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");
|
throw new ViewParameterException("OHLC view needs a String-typed time type value for parameter 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
Class intervalClass = interval.getForge().getEvaluationType();
|
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();
|
Class timestampClass = timestamp.getForge().getEvaluationType();
|
||||||
|
|||||||
Reference in New Issue
Block a user