In the JForex platform, creation of a new indicator produces boilerplate code that includes these two methods:
public OptInputParameterInfo getOptInputParameterInfo(int index) {
if (index <= optInputParameterInfos.length) {
return optInputParameterInfos[index];
}
return null;
}
public OutputParameterInfo getOutputParameterInfo(int index) {
if (index <= outputParameterInfos.length) {
return outputParameterInfos[index];
}
return null;
}
Surely the two occurrences of "<=" here should be "<", since if an array has length N, trying to access element N gives an out of bounds error?