wso2 / balana

Apache License 2.0
122 stars 108 forks source link

Exception when registering a custom set function #141

Open mdrozdo opened 4 years ago

mdrozdo commented 4 years ago

Description: When trying to register a custom set function the SetFunction.getXXInstance method throws an exception due to not finding the function name in the internal map.

Affected Product Version: All

OS, DB, other environment details and versions:
All

Steps to reproduce: Call SetFunction.getSetEqualsInstance("functionName", "anyDatatype") Function throws

IllegalArgumentException("unknown set function functionName")

I suppose the ConditionSetFunction constructor should call getId on function type not function name (see below). but I haven't tested it.

public ConditionSetFunction(String functionName, String datatype, String functionType) {
        super(functionName, getId(functionType), datatype, BooleanAttribute.identifier, false);
    }