The java-diff-utils library is for computing diffs, applying patches, generation side-by-side view in Java.
It is an open source library for performing comparison operations between chunks of text: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future display (like a side-by-side view) and so on.
The main reason for creating this library was the lack of easy-to-use libraries with all the usual features necessary for working with diff files. Originally it was inspired by the JRCS library and its nice diff module design.
Original code and docs were forked from: java-diff-utils
- Computing the difference between two chunks of text.
- Capable of handling more than plain ASCII. Arrays or Lists of any type that implement hashCode() and equals() correctly can be used as inputs for differencing using this library.
- Patch and unpatch the text with the given patch.
- Parsing the unified diff format.
- Producing human-readable differences.
This library implements Myers' diff algorithm, but it is modular so it is easy to replace the algorithm with another which might be better suited to your needs.
- In Spanish: Comparar Ficheros java-diff-utils
- Bugfix: Fix issue showing inline diffs.
- Added some unit tests.
- Removes the dependency on Guava time
- Change groupId and artifactId to prevent conflict with origin library: now 'com.github.java-diff-utils:java-diff-utils' instead of 'jp.skypencil.java-diff-utils:diffutils'
- Adds the ability to differentiate the inserted and deleted tags and class-names in inline-diff
- Default class-name is now
null
for deleted and inserted data, and "change
" for change data - Default tag for deleted data is
del
- Default tag for inserted data is
ins
- can now customize diff algorithm in
DiffRowGenerator.Builder
- fix "equal" lines when lines isn't really equals (when Equalizer return equals on different strings)
- fix imbrication tag bug in lineDiff (when inline is on a multi-line chunk)
- Adds tha ability to skip data
- make Equalizer configurable. (pull #1)
- bugfix: parse method should be public
- switch from JDK5 to JDK7
- add Guava to dependency
- let user uses other string to represent line which does not exist
- implement event based parser like SAX (in difflib.event package)