Skip to content

Commit

Permalink
Cleaned up a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
harawata committed Jan 26, 2025
1 parent d10f123 commit f2047c3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ public String getSql() {

private void initTokenParser(List<ParameterMapping> parameterMappings) {
if (tokenParser == null) {
tokenHandler = new ParameterMappingTokenHandler(parameterMappings, configuration, parameterObject, parameterType,
bindings, paramExists);
tokenHandler = new ParameterMappingTokenHandler(parameterMappings != null ? parameterMappings : new ArrayList<>(),
configuration, parameterObject, parameterType, bindings, paramExists);
tokenParser = new GenericTokenParser("#{", "}", tokenHandler);
}
}

public List<ParameterMapping> getParameterMappings() {
initTokenParser(new ArrayList<>());
return tokenHandler == null ? new ArrayList<>() : tokenHandler.getParameterMappings();
initTokenParser(null);
return tokenHandler.getParameterMappings();
}

protected String parseParam(String sql) {
Expand Down

0 comments on commit f2047c3

Please sign in to comment.