LRUCachePolicy incompatiblity WAS Re: [jboss-dev] Remoting shutdown errors and warnings

Adrian Brock abrock at redhat.com
Thu Sep 4 11:41:02 EDT 2008


On Thu, 2008-09-04 at 18:39 +0300, Dimitris Andreadis wrote:
> To be honest, I wouldn't have thought that changing a protected field to a supertype would 
> present compatibility issues.

The field's type is part of the resolution process,
its an exact match.

http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#42041

If it wasn't, code like

private HashMap m_map;

m_map.clone()

(not a method on Map) would break in just as strange ways.

But I think the JVM could give more information to determine the cause,

i.e. if it can't find the expected field it could do a search of all
the fields and produce:

java.lang.NoSuchFieldError: m_map - incompatible type change -
compilation had java.util.HashMap, it is now java.util.Map
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list