JDK-5060820 : Generification conflict: Properties vs. javax.naming.directory.InitialDirContext
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: solaris_10
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: generic
  • Submitted: 2004-06-09
  • Updated: 2004-07-21
  • Resolved: 2004-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b59Fixed
Related Reports
Relates :  
Description
There are new java build failures introduced on s10_60.   The same CDE source code built on s10_58 were fine.   We are using default java from s10_60.  

% java -version
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51a)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51a, mixed mode, sharing)


The following are the build errors:
/net/tostada/export/cde-re/release/build3/CDE1.6-build/sparc/opt/build/jdksrc/pd
a/sunw/jdt/cal/util/GetId.java:80: cannot find symbol
symbol  : constructor InitialDirContext(java.util.Properties)
location: class javax.naming.directory.InitialDirContext
            DirContext ctx = new InitialDirContext(jndiEnv);
                             ^
/net/tostada/export/cde-re/release/build3/CDE1.6-build/sparc/opt/build/jdksrc/pd
a/sunw/jdt/cal/rpc/xdr_dg.java:88: warning: [deprecation] stop() in 
java.lang.Thread has been deprecated
                reader.stop();
                      ^
/net/tostada/export/cde-re/release/build3/CDE1.6-build/sparc/opt/build/jdksrc/pd
a/sunw/jdt/cal/rpc/xdr_dg.java:271: warning: [deprecation] stop() in 
java.lang.Thread has been deprecated
                stop();
                ^
Note: 
/net/tostada/export/cde-re/release/build3/CDE1.6-build/sparc/opt/build/jdksrc/pd
a/sunw/jdt/cal/rpc/PMapSvc.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
3 warnings
*** Error code 1

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b59 tiger-rc
11-08-2004

EVALUATION This is precisely the same issue as 5056707 but for a different API element There is a conflict between the generification of javax.naming.directory.InitialDirContext and Properties. I recommend either using wildcards, if the Hashtable contains only input parameter data to the constructor, or modifying the generification of Properties to Hashtable<String,String>. ###@###.### 2004-06-09 The best fix for this bug would be to revise java.util.Properties to extend Hashtable<String,String>, as suggested, but doing that in a binary-compatible way first requires that 5064052 (unnecessary bridge methods interfere with some generics retrofitting) be fixed. -- ###@###.### 2004/6/16 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. -- ###@###.### 2004/7/16
07-12-0182