Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Configuration's equals method only checks the configuration keys of the object the method is called on, meaning that the method will still return true if the object passed as the function argument contains additional config parameters. For example:
Configuration a = new Configuration(); Configuration b = new Configuration(); a.set(TaskManagerOptions.TOTAL_PROCESS_MEMORY, MemorySize.parse("1024mb")); b.set(TaskManagerOptions.TOTAL_PROCESS_MEMORY, MemorySize.parse("1024mb")); b.set(TaskManagerOptions.KILL_ON_OUT_OF_MEMORY, true); a.equals(b); // true b.equals(a); // false