jjazzboss commented on issue #9270: URL: https://github.com/apache/netbeans/issues/9270#issuecomment-4063922420
> Wondering why you expect it to work if the instance identity changes? Because it's not written anywhere. By comparison the javadoc of hash-based collections contain clear warnings, e.g. for `Map`: "Note: great care must be exercised if mutable objects are used as map keys". And it's not obvious because : - Lookup.lookup() will continue to work even if an object inside the lookup mutates - as @matthiasblaesing said, `InstanceContent.add()` javadoc can be misleading - InstanceContent.remove() DOES work with mutable objects, but only if there is less than 11 objects in the lookup > Simplest solution: Document the constraint (hashCode must not change) for InstanceContent. Yes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
