Reports calls to the following methods on java.util.Properties objects:

For historical reasons, java.util.Properties inherits java.util.Hashtable, but using those methods is discouraged to prevent corruption of properties values of types other than String.

Although java.util.Properties#putAll overrides java.util.Hashtable#putAll it doesn't get reported when both the key and the value parameters in the map are of the String type.

Example:


  Object f(Properties props) {
    props.put("hello", "world");
    props.putIfAbsent("hello", "world");
    props.putAll(new HashMap<>());
    return props.get("Hello");
  }

After the quick-fix is applied:


  Object f(Properties props) {
    props.setProperty("hello", "world");
    props.putIfAbsent("hello", "world");
    props.putAll(new HashMap<>());
    return props.getProperty("hello");
  }