Skip to content

Commit

Permalink
Fixed factory for extended parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jun 13, 2022
1 parent 1664a8d commit d23ed08
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -39,16 +39,16 @@ class XParameterFactory extends AbstractFactory {

@Override
Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) throws InstantiationException, IllegalAccessException {
def parameter
XParameter parameter
if (FactoryBuilderSupport.checkValueIsTypeNotString(value, name, XParameter)) {
parameter = value
parameter = (XParameter) value
}
else {
def paramName = attributes.remove('name')
String paramName = attributes.remove('name')
if (paramName == null) {
paramName = value
}
def paramValue = attributes.remove('value')
String paramValue = attributes.remove('value')
parameter = [paramName, paramValue]
}
return parameter
Expand Down

0 comments on commit d23ed08

Please sign in to comment.