EnumType.setParameterValues(Properties) cannot handle Properties's defaults

Description

EnumType.setParameterValues(Properties) reads the passed properties using properties.get() instead of properties.getProperty(). This causes NullPointerExceptions when passing in correctly configured parameters that contain nested defaults.

Example:
public class EnumByNameType extends EnumType {
private static final long serialVersionUID = -5179606529789070604L;

@Override
public void setParameterValues(Properties parameters) {
Properties patchedParams = new Properties(parameters);
patchedParams.setProperty(TYPE, Integer.toString(Types.VARCHAR));
super.setParameterValues(patchedParams );
}

One should always use getProperty() when dealing with Java Properties.
Also feel free to make a complaint to the original Java properties class developer for the poor API design

Environment

None

Status

Assignee

Unassigned

Reporter

Christian Ramseier

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure