1
1
/*
2
- * Copyright 2002-2023 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -125,7 +125,7 @@ public BeanPropertyRowMapper(Class<T> mappedClass, ConversionService conversionS
125
125
* Remove the specified property from the mapped properties.
126
126
* @param propertyName the property name (as used by property descriptors)
127
127
*/
128
- protected void suppressProperty (String propertyName ) {
128
+ protected void suppressProperty (@ Nullable String propertyName ) {
129
129
this .mappedProperties .remove (lowerCaseName (propertyName ));
130
130
this .mappedProperties .remove (underscoreName (propertyName ));
131
131
}
@@ -136,7 +136,10 @@ protected void suppressProperty(String propertyName) {
136
136
* @param name the original name
137
137
* @return the converted name
138
138
*/
139
- protected String lowerCaseName (String name ) {
139
+ protected String lowerCaseName (@ Nullable String name ) {
140
+ if (!StringUtils .hasLength (name )) {
141
+ return "" ;
142
+ }
140
143
return name .toLowerCase (Locale .US );
141
144
}
142
145
@@ -147,7 +150,7 @@ protected String lowerCaseName(String name) {
147
150
* @return the converted name
148
151
* @see #lowerCaseName
149
152
*/
150
- protected String underscoreName (String name ) {
153
+ protected String underscoreName (@ Nullable String name ) {
151
154
if (!StringUtils .hasLength (name )) {
152
155
return "" ;
153
156
}
0 commit comments