JDK-6368455 : (props) Properties should extend Hashtable not Hashtable
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2006-01-03
  • Updated: 2010-04-26
  • Resolved: 2006-01-04
Related Reports
Relates :  
Relates :  
Relates :  
Description
J2SE Version (please include all output from java -version flag):
  java version "1.6.0-rc"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b65)
  Java HotSpot(TM) Client VM (build 1.6.0-rc-b65, mixed mode, sharing)

Does this problem occur on J2SE 1.4.x or 5.0.x ?  Yes / No (pick one)
  Yes

Operating System Configuration Information (be specific):
  Microsoft Windows 2000 [Version 5.00.2195]

Hardware Configuration Information (be specific):
  Pentium 4

Bug Description:
  java.util.Properties should extend Hashtable<String,String> not Hashtable<Object,Object>

  All the methods are implemented using Strings and all the documentation says that the
  keys and values must be Strings.

Comments
EVALUATION The submitter's sentiment is popular, and has been considered, but cannot be satisfied. From the evaluation of 5056707: Unfortunately it proved impossible to revise java.util.Properties to extend Hashtable<String,String> since that would have introduced a subtle binary incompatibility. The relevant APIs have instead been revised to accept arguments of type Hashtable<?,?> rather than their current, more-specific types.
04-01-2006