buildEventF.get() may be null
The buildEventF future is built by FileTransport.asStreamProto(), and thus, as
the documentation says, may return null if there was an interrupt.
RELNOTES: None.
@@ -132,9 +132,11 @@ abstract class FileTransport implements BuildEventTransport {
!= CLOSE_EVENT_FUTURE) {
if (buildEventF != null) {
BuildEventStreamProtos.BuildEvent buildEvent = buildEventF.get();
+ if (buildEvent != null) {
byte[] serialized = serializeFunc.apply(buildEvent);
out.write(serialized);
}
+ }
Instant now = Instant.now();
if (buildEventF == null || now.compareTo(prevFlush.plus(FLUSH_INTERVAL)) > 0) {
// Some users, e.g. Tulsi, expect prompt BEP stream flushes for interactive use.
