matthiasblaesing commented on PR #3995: URL: https://github.com/apache/netbeans/pull/3995#issuecomment-1117787051
I see several modules from the java area in the list of affected modules. If any of these creates `SingleMethod` instances and receives one from one of the modules you modified, they will not be `equals`. Consider a Method `Dummy#test` in the file `Dummy.java`, you create: `SingleMethod(file=Dummy.java, methodName=test, enclosingType=Dummy)` but the receiving module might create this: `SingleMethod(file=Dummy.java, methodName=test, enclosingType=null)` According to the implementation of `equals` these two are not equal anymore. This becomes even harder because the relationship between the filename and the enclosing type is only trivial for java, but not for other languages. PHP and Javascript for example have no hard connection between filename and embedded type, so they can't be derived from each other. For PHP for example the methodName is the combination of the type and the type. See here: https://github.com/apache/netbeans/blob/030c2f302a8d67fedc4ccff789fcf1acfb977986/php/php.project/src/org/netbeans/modules/php/project/ui/actions/support/TestSingleMethodSupport.java#L101 and https://github.com/apache/netbeans/blob/030c2f302a8d67fedc4ccff789fcf1acfb977986/php/php.project/src/org/netbeans/modules/php/project/ui/actions/support/CommandUtils.java#L81-L83 -- 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
