Port CompareUpstreams tool to Java and improve.
This version runs ~ 50x faster than the .py version, is configured via
environment variables rather than command line parameters, and has
additional features:
* Summarize change comments that occur in each file
* Add support for OpenJDK 9 upstreams.
* Know expected upstream for each file (hard coded), currently 9b113+
for java.util.concurrent and parts of java.util, but 8u121-b13 for
everything else.
* Add functionality to copy files from each upstream
(rather than just 8u121-b13) to $OJLUNI_UPSTREAMS
* As a side effect, this fixes the counting of line numbers: If a file
ends with a newline, Python counts that as an additional (empty) line,
whereas the Java version counts the newline character as belonging to
the line that it terminates; Java's interpretation matches that of
unix tools such as wc -l.
Bug: 35910877
Test: make libcore-compare-upstreams && \
java -jar out/host/linux-x86/framework/libcore-compare-upstreams.jar
Test: make libcore-copy-upstream-files && \
java -jar out/host/linux-x86/framework/libcore-copy-upstream-files.jar \
/tmp/upstreams
Change-Id: I1604b4c4430fe032250f694b7db42456c7653d64
11 files changed