gumtree-spoon-ast-diff icon indicating copy to clipboard operation
gumtree-spoon-ast-diff copied to clipboard

Support for generics

Open sedflix opened this issue 6 years ago • 0 comments

Currently, we don't support identifying changes which are related generics in Java. This happens due to two reasons:

  • Ignoring all CtReference in isToIgnore()
  • No labels are assigned to CtReference in gumtree.spoon.builder.LabelFinder.

In the scenario of Class<T>, T has the role of TYPE_ARGUMENT and Class<T> has the role of TYPE. Checking for this pattern in isToIgnore() and making corresponding changes in LabelFinder should help us consider the scenario of generics, but it may also result in consideration of unwanted cases.

For example, The above conditions lead to a weird failure of one test case, ie: DiffTest.testToString(). image

sedflix avatar May 22 '19 10:05 sedflix