com.google.common.truth.extensions.proto.AutoValue_DiffResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truth-proto-extension Show documentation
Show all versions of truth-proto-extension Show documentation
An extension for the Truth test assertion framework supporting
Protocol Buffers.
The newest version!
package com.google.common.truth.extensions.proto;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableListMultimap;
import com.google.errorprone.annotations.concurrent.LazyInit;
import com.google.protobuf.Message;
import java.lang.Integer;
import java.lang.Iterable;
import java.lang.Override;
import java.lang.SuppressWarnings;
final class AutoValue_DiffResult extends $AutoValue_DiffResult {
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile Iterable extends RecursableDiffEntity> childEntities;
AutoValue_DiffResult(Message actual, Message expected,
ImmutableListMultimap singularFields,
ImmutableListMultimap repeatedFields,
Optional unknownFields) {
super(actual, expected, singularFields, repeatedFields, unknownFields);
}
@Override
Iterable extends RecursableDiffEntity> childEntities() {
if (childEntities == null) {
synchronized (this) {
if (childEntities == null) {
childEntities = super.childEntities();
if (childEntities == null) {
throw new NullPointerException("childEntities() cannot return null");
}
}
}
}
return childEntities;
}
}