Upstream tooling: Fix java{,x}.sql missing from 'expected' snapshot.

The java{,x}.sql classes were missing from the snapshot of
files in the 'expected' upstream revision because CopyUpstreamFiles
was checking for

   upstream.equals(expectedUpstream)

before copying a file to the "expected/" subfolder, but
Repository.equals() was based on object identity and the
StandardRepositories constructor created two instances of the
OpenJDK 7u40 repository, which were then not considered equal.

This bug was probably introduced by http://r.android.com/640021
(commit 2af621453187a8ce05724575a2749aca890a3976).

Test: After this CL, the directory ~/ojluni-upstreams/java/sql
  gets created by the following command:
  make libcore-copy-upstream-files && java -jar \
   out/host/linux-x86/framework/libcore-copy-upstream-files.jar \
   ~/ojluni-upstreams
Bug: 35910877

Change-Id: Icacedb46e6b922206aa5603ae668eb8bddf9ade2
1 file changed