Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#227 Minor bug in FunctionSpec class

1.3.0 (final)
closed-fixed
Ernst de Haan
3
2006-02-27
2006-02-27
Ernst de Haan
No

The FunctionSpec class contains the following code, in
the parseCombos(Element,Map,boolean) method:

while (itParamDefs.hasNext()) {
Element paramDef = (Element) itParamDefs.next();
String parameterName = paramDef.getAttribute("name");
if (parameterName == null) {
throw new InvalidSpecificationException("Missing
name for a parameter in " + comboTag + ".");
}
ParameterSpec parameter = (ParameterSpec)
parameters.get(parameterName);
if (parameterName == null) {
throw new InvalidSpecificationException("Incorrect
parameter name \"" + parameterName + "\" in " +
comboTag + ".");
}
paramComboParameters.put(parameterName, parameter);
}

Note that there are 2 checks on (parameterName ==
null). The second one is superfluous.

In fact the second one should check 'parameter' instead
of 'parameterName'.

Discussion

  • Ernst de Haan
    Ernst de Haan
    2006-02-27

    Logged In: YES
    user_id=11053

    Fixed. Will be in XINS 1.4.0-beta1.

     
  • Ernst de Haan
    Ernst de Haan
    2006-02-27

    • status: open --> closed-fixed