That is a rather basic generics error that is a bug in javac since Properties is typed as Map<Object,Object>, not Map<String,String>. You are asking to be able to do (replacing ? with String to be more concrete):
Map<Object,Object> m1 = ...; Map<String,String> m2 = (Map<String,String>) m1; javac disallows this as it should since one would be able to do the following otherwise: m1.put("one", new Integer(1)); String one = m2.get("one"); // CCE since Integer !instanceof String In the Properties case javac must be getting lost in the non-trivial inheritance tree. See the following for discussions of the less intuitive aspects of generics: http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Max Rydahl Andersen > Sent: Wednesday, July 12, 2006 3:57 AM > To: Hibernate development > Subject: [Hibernate] eclipse chokes on current annotations code > > > javac works fine, but eclipse chokes on casting Properties to > Map<String, ?> > > I've bugged eclipse about it to see what they provide as explanation. > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=150362 > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel