Java: do not generate models for toString and lambda flow methods - #15772
Conversation
|
@owen-mc : Looks like you pushed the wrong branch :-D |
|
Oops. This is what happens when I work late at night. |
51f94a6 to
bbf3fa7
Compare
toStringtoString and lambda flow methods
|
I've added an exclusion for the functions in the comment at the bottom of |
| isInternal(c.getCompilationUnit()) or | ||
| c instanceof MainMethod or | ||
| c instanceof ToStringMethod or | ||
| c instanceof LambdaFlowMethod or |
There was a problem hiding this comment.
Would it make sense to use FunctionalInterface instead? i.e.
| c instanceof LambdaFlowMethod or | |
| c = any(FunctionalInterface f).getRunMethod() or |
There was a problem hiding this comment.
Hm, nvm, some of those aren't functional interfaces.
There was a problem hiding this comment.
Hmm, I might be able to use that to replace some of the hard-coded method names. I'll have a play around with it.
There was a problem hiding this comment.
It gave almost 7000 results! I think it's best to just hard-code a few for now and if we find we want to do more in future then we can come up with a clever way to characterise them.
We generally don't want to model
toString. It is better not to generate models for them, and add manual models where they are needed.We also don't want to have any models for certain functions relating to lambda flow.