Fix Nomulus build errors

This fixes Java7 generic type inference errors in premium list code
and upgrades the Truth library to v0.32, because we're now using
assert(e).hasMessageThat() which is not in prior versions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148501657
This commit is contained in:
mcilwain 2017-02-24 14:08:16 -08:00 committed by Ben McIlwain
parent ea4e471c04
commit 8d84397e80
2 changed files with 7 additions and 6 deletions

View file

@ -108,7 +108,8 @@ public final class PremiumListUtils {
final Key<PremiumListRevision> newRevisionKey = Key.create(newRevision);
ImmutableSet<PremiumListEntry> parentedEntries =
parentPremiumListEntriesOnRevision(
firstNonNull(premiumListEntries.values(), ImmutableSet.of()), newRevisionKey);
firstNonNull(premiumListEntries.values(), ImmutableSet.<PremiumListEntry>of()),
newRevisionKey);
// Save the new child entities in a series of transactions.
for (final List<PremiumListEntry> batch :
@ -160,7 +161,7 @@ public final class PremiumListUtils {
/** Re-parents the given {@link PremiumListEntry}s on the given {@link PremiumListRevision}. */
public static ImmutableSet<PremiumListEntry> parentPremiumListEntriesOnRevision(
Iterable<PremiumListEntry> entries, final Key<PremiumListRevision> revisionKey) {
return FluentIterable.from(firstNonNull(entries, ImmutableSet.of()))
return FluentIterable.from(entries)
.transform(
new Function<PremiumListEntry, PremiumListEntry>() {
@Override

View file

@ -1128,11 +1128,11 @@ def com_google_re2j():
def com_google_truth():
java_import_external(
name = "com_google_truth",
jar_sha256 = "f4a4c5e69c4994b750ce3ee80adbb2b7150fe39f057d7dff89832c8ca3af512e",
jar_sha256 = "032eddc69652b0a1f8d458f999b4a9534965c646b8b5de0eba48ee69407051df",
jar_urls = [
"http://domain-registry-maven.storage.googleapis.com/repo1.maven.org/maven2/com/google/truth/truth/0.30/truth-0.30.jar",
"http://repo1.maven.org/maven2/com/google/truth/truth/0.30/truth-0.30.jar",
"http://maven.ibiblio.org/maven2/com/google/truth/truth/0.30/truth-0.30.jar",
"http://domain-registry-maven.storage.googleapis.com/repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
"http://repo1.maven.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
"http://maven.ibiblio.org/maven2/com/google/truth/truth/0.32/truth-0.32.jar",
],
licenses = ["notice"], # The Apache Software License, Version 2.0
testonly_ = True,