Browse Source

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.

mitm 6 years ago
parent
commit
416b866c78
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jme3-core/src/main/java/com/jme3/system/AppSettings.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/system/AppSettings.java

@@ -274,7 +274,7 @@ public final class AppSettings extends HashMap<String, Object> {
      */
     public void mergeFrom(AppSettings other) {
         for (String key : other.keySet()) {
-            if (get(key) == null) {
+            if( !this.containsKey(key) ) {
                 put(key, other.get(key));
             }
         }