Quellcode durchsuchen

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 vor 6 Jahren
Ursprung
Commit
416b866c78
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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));
             }
         }