|
24 | 24 | import io.r2dbc.postgresql.message.backend.RowDescription;
|
25 | 25 | import io.r2dbc.postgresql.util.Assert;
|
26 | 26 | import io.r2dbc.spi.Row;
|
27 |
| -import java.util.HashMap; |
28 |
| -import java.util.Locale; |
29 |
| -import java.util.Map; |
30 | 27 | import reactor.core.publisher.Mono;
|
31 | 28 | import reactor.util.annotation.Nullable;
|
32 | 29 |
|
33 | 30 | import java.util.ArrayList;
|
| 31 | +import java.util.HashMap; |
34 | 32 | import java.util.List;
|
| 33 | +import java.util.Locale; |
| 34 | +import java.util.Map; |
35 | 35 | import java.util.NoSuchElementException;
|
36 | 36 | import java.util.Objects;
|
37 | 37 |
|
@@ -144,9 +144,9 @@ public String toString() {
|
144 | 144 | }
|
145 | 145 |
|
146 | 146 | static Map<String, Integer> createColumnNameIndexMap(List<RowDescription.Field> fields) {
|
147 |
| - Map<String, Integer> columnNameIndexMap = new HashMap<>(fields.size() * 2); |
| 147 | + Map<String, Integer> columnNameIndexMap = new HashMap<>(fields.size(), 1); |
148 | 148 | for (int i = fields.size() - 1; i >= 0; i--) {
|
149 |
| - columnNameIndexMap.put(fields.get(i).getName().toLowerCase(Locale.US), i); |
| 149 | + columnNameIndexMap.put(fields.get(i).getName().toLowerCase(Locale.ROOT), i); |
150 | 150 | }
|
151 | 151 |
|
152 | 152 | return columnNameIndexMap;
|
@@ -188,7 +188,7 @@ private int getColumn(String name) {
|
188 | 188 | return index;
|
189 | 189 | }
|
190 | 190 |
|
191 |
| - index = this.columnNameIndexCacheMap.get(name.toLowerCase(Locale.US)); |
| 191 | + index = this.columnNameIndexCacheMap.get(name.toLowerCase(Locale.ROOT)); |
192 | 192 | if (index != null) {
|
193 | 193 | this.columnNameIndexCacheMap.put(name, index);
|
194 | 194 | return index;
|
|
0 commit comments