Fixing Java Properties
<p>Java Properties docs strongly discourages the use of put and putAll methods. I just had a look at the source code of Properties class, I am a bit surprised to see extended Hashtable parameterized type is set to Object rather than String. Is there an other reason apart from backward compatibility? Also Can Properties class not override put and putAll methods with an extra precondition (I know it's a violation of LKP but extending Hashtable was a bad choice anyway), roughly, like :</p>

<pre><code>if(p1 instanceof String &amp;&amp; p2 instanceof String) {
          return super.put(p1, p2);         
}else {
          throw new IllegalArgumentException("Invalid argument type");
}
</code></pre>

<p>Thanks,</p>

<p>Abidi</p>
