Community
Participate
Working Groups
From Gleb: CanonicalEditPolicy wrongly relies on the particular implementation of View#toString method to generate IDs in the addListenersToContainers method. It should use hashCode method instead: addListenerFilter("NotationListener_Container" + containerView.hashCode().toString() instead of addListenerFilter("NotationListener_Container" + containerView.toString(). We override View#toString method with a Debug-friendlier implementation and this causes problems for us.
containerView.hashCode().toString() ERROR: cannot invoke toString() on a primitive type int So cannot fix as suggested.
The correct code probably would be something like: String.valueOf(containerView.hashCode())
Hi Marc, Can you verify the requested change for me?
Created attachment 111327 [details] requested fix This replaces the call to toString() with the implementation of toString(), so it can be overridden without affecting the listener list.
Committed the fix for 2.1.2 and 2.2 [241252] gmf_head mgobeil 080903 addListenersToContainers of CanonicalEditPolicy wrongly uses toString method to generate IDs [241252] gmf_R2_1_maintenance mgobeil 080903 addListenersToContainers of CanonicalEditPolicy wrongly uses toString method to generate IDs
[GMF Restructure] Bug 319140 : product GMF and component Runtime was the original product and component for this bug