On 2/21/06, robert burrell donkin <[EMAIL PROTECTED]> wrote: > the reason for indexing on classloaders is to allow configurations to be > saved on a per classloader basis. it strikes me that identity should be > as good as equality for this indexing. if so, then we could use > System.identityHashCode as the index rather than the actual classloader. > > please feel free to spot the flaws with this plan :)
Just gotta stress the *should*. System.identityHashCode returns an int, technically that won't cut it for 64 bit Java. That said if you find a real solution to this problem I'd like to know because the reference and debug features of composite pool implementation I submitted currently depend on hoping the System.identityHashCode doesn't return the same value for two different instances. I don't like that code but I don't expect many people to use it in production. If you expect people to often use that technique in production I think we should keep looking. -- Sandy McArthur "He who dares not offend cannot be honest." - Thomas Paine --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]