From 416b866c78633534dbca91d15e9778c882ccdae4 Mon Sep 17 00:00:00 2001 From: mitm Date: Thu, 27 Dec 2018 14:52:40 -0700 Subject: [PATCH] Fixed a problem with mergeFrom() where a key that was explicitly mapped to null was taken to mean it had no mapping. Checking that the key has a mapping instead fixes problem. --- jme3-core/src/main/java/com/jme3/system/AppSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/system/AppSettings.java b/jme3-core/src/main/java/com/jme3/system/AppSettings.java index 1e058f329..a9f1f8f95 100644 --- a/jme3-core/src/main/java/com/jme3/system/AppSettings.java +++ b/jme3-core/src/main/java/com/jme3/system/AppSettings.java @@ -274,7 +274,7 @@ public final class AppSettings extends HashMap { */ public void mergeFrom(AppSettings other) { for (String key : other.keySet()) { - if (get(key) == null) { + if( !this.containsKey(key) ) { put(key, other.get(key)); } }