Question

Is there any diff tool specifically for Java that doesn't just highlight differences in a file, but is more complex?

By more complex I mean it'd take 2 input files, the same class file of different versions, and tell me things like:

  • Field names changed
  • New methods added
  • Deleted methods
  • Methods whose signatures have changed
  • Methods whose implementations have changed (not interested in any more detail than that)

Done some Googling and can't find anything like this...I figure it could be useful in determining whether or not changes to dependencies would require a rebuild of a particular module.

Thanks in advance

Edit:

I suppose I should clarify:

I'm not bothered about a GUI for the tool, it'd be something I'm interested in calling programmatically.

And as for my reasoning:

  • To workout if I need to rebuild certain modules/components if their dependencies have changed (which could save us around 1 hour per component)... More detailed explanation but I don't really see it as important.
  • To be used to analyse changes made to certain components that we are trying to lock down and rely on as being more stable, we are attempting to ensure that only very rarely should method signatures change in a particular component.
Was it helpful?

Solution

You said above that Clirr is what you're looking for.

But for others with slightly differet needs, I'd like to recommend JDiff. Both have pros and cons, but for my needs I ended up using JDiff. I don't think it'll satisfy your last bullet point and it's difficult to call programmatically. What it does do is generate a useful report for API differences.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top