Replace keySet with entrySet

Closes #40064

Signed-off-by: akbarhusainpatel <apatel@intermiles.com>
Co-authored-by: akbarhusainpatel <apatel@intermiles.com>
This commit is contained in:
Akbar Husain
2025-08-14 21:01:15 +05:30
committed by GitHub
parent 0c33217729
commit 06f80416fb
26 changed files with 97 additions and 89 deletions

View File

@@ -179,8 +179,9 @@ public class RealmConfigData {
if (clients == null) {
clients = source.clients;
} else {
for (String key: source.clients.keySet()) {
String val = source.clients.get(key);
for (var entry : source.clients.entrySet()) {
String key = entry.getKey();
String val = entry.getValue();
if (!"".equals(val)) {
clients.put(key, val);
} else {

View File

@@ -370,8 +370,7 @@ public class ReflectionUtil {
// use setter on dest, and getter on source to copy value over
Map<String, Field> fieldMap = getAttrFieldsForType(source.getClass());
try {
for (String attrName : fieldMap.keySet()) {
Field field = fieldMap.get(attrName);
for (Field field : fieldMap.values()) {
Object localValue = field.get(source);
if (localValue != null) {
field.set(dest, localValue);