Code Polishing (Sonar)
- remove redundant modifiers - overridable methods called from ctors Polishing - PR Comments
This commit is contained in:
committed by
Artem Bilan
parent
ddb4321e1d
commit
255247ca9a
@@ -46,6 +46,7 @@ public class BeanPropertySqlParameterSourceFactory implements SqlParameterSource
|
||||
this.staticParameters = staticParameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqlParameterSource createParameterSource(Object input) {
|
||||
SqlParameterSource toReturn = new StaticBeanPropertySqlParameterSource(input, staticParameters);
|
||||
return toReturn;
|
||||
@@ -58,16 +59,18 @@ public class BeanPropertySqlParameterSourceFactory implements SqlParameterSource
|
||||
|
||||
private final Map<String, Object> staticParameters;
|
||||
|
||||
public StaticBeanPropertySqlParameterSource(Object input, Map<String, Object> staticParameters) {
|
||||
private StaticBeanPropertySqlParameterSource(Object input, Map<String, Object> staticParameters) {
|
||||
this.input = new BeanPropertySqlParameterSource(input);
|
||||
this.staticParameters = staticParameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue(String paramName) throws IllegalArgumentException {
|
||||
return staticParameters.containsKey(paramName) ? staticParameters.get(paramName) : input
|
||||
.getValue(paramName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasValue(String paramName) {
|
||||
return staticParameters.containsKey(paramName) || input.hasValue(paramName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user