Skip to content

Commit bbcff18

Browse files
authored
[5.2.0] Update java_tools 11.7.1 (bazelbuild#15231)
* Update java_tools v11.7.1 A new release was required because bazelbuild@0c65082 caused java_tools to be built targetting java11, inadvertently dropping support for jre8/9/10 Closes bazelbuild#15258. PiperOrigin-RevId: 441834316 (cherry picked from commit 22c91da) * Automatic code cleanup. PiperOrigin-RevId: 414481809 (cherry picked from commit 1987af2) * Automatic code cleanup. PiperOrigin-RevId: 415349792 (cherry picked from commit ccc9b9d) A clean cherry pick was not possible since the contents of various files in the change have diverged since this release branch was cut.
1 parent 2422cfb commit bbcff18

File tree

18 files changed

+42
-42
lines changed

18 files changed

+42
-42
lines changed

distdir_deps.bzl

+16-16
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ DIST_DEPS = {
283283
"remote_java_tools_test",
284284
"remote_java_tools_for_testing",
285285
],
286-
"archive": "java_tools-v11.6.zip",
287-
"sha256": "a7ac5922ee01e8b8fcb546ffc264ef314d0a0c679328b7fa4c432e5f54a86067",
286+
"archive": "java_tools-v11.7.1.zip",
287+
"sha256": "2eede49b2d80135e0ea22180f63df26db2ed4b795c1c041b25cc653d6019fbec",
288288
"urls": [
289-
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools-v11.6.zip",
290-
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools-v11.6.zip",
289+
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools-v11.7.1.zip",
290+
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools-v11.7.1.zip",
291291
],
292292
"used_in": [
293293
"additional_distfiles",
@@ -299,11 +299,11 @@ DIST_DEPS = {
299299
"remote_java_tools_test_linux",
300300
"remote_java_tools_linux_for_testing",
301301
],
302-
"archive": "java_tools_linux-v11.6.zip",
303-
"sha256": "15da4f84a7d39cd179acf3035d9def638eea6ba89a0ed8f4e8a8e6e1d6c8e328",
302+
"archive": "java_tools_linux-v11.7.1.zip",
303+
"sha256": "f78077f0c043d0d13c82de0ee4a99753e66bb18ec46e3601fa2a10e7f26798a8",
304304
"urls": [
305-
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_linux-v11.6.zip",
306-
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_linux-v11.6.zip",
305+
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools_linux-v11.7.1.zip",
306+
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools_linux-v11.7.1.zip",
307307
],
308308
"used_in": [
309309
"additional_distfiles",
@@ -315,11 +315,11 @@ DIST_DEPS = {
315315
"remote_java_tools_test_windows",
316316
"remote_java_tools_windows_for_testing",
317317
],
318-
"archive": "java_tools_windows-v11.6.zip",
319-
"sha256": "939f9d91f0df02851bbad8f5b1d26d24011329394cafe5668c1234e31ac2a1f7",
318+
"archive": "java_tools_windows-v11.7.1.zip",
319+
"sha256": "a7086734866505292ee4c206328c73c6af127e69bd51b98c9c186ae4b9b6d2db",
320320
"urls": [
321-
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_windows-v11.6.zip",
322-
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_windows-v11.6.zip",
321+
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools_windows-v11.7.1.zip",
322+
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools_windows-v11.7.1.zip",
323323
],
324324
"used_in": [
325325
"additional_distfiles",
@@ -331,11 +331,11 @@ DIST_DEPS = {
331331
"remote_java_tools_test_darwin",
332332
"remote_java_tools_darwin_for_testing",
333333
],
334-
"archive": "java_tools_darwin-v11.6.zip",
335-
"sha256": "f17ee54582b61f1ebd84c8fa2c54df796914cfbaac3cb821fb1286b55b080bc0",
334+
"archive": "java_tools_darwin-v11.7.1.zip",
335+
"sha256": "4d6d388b54ad3b9aa35b30dd67af8d71c4c240df8cfb5000bbec67bdd5c53a73",
336336
"urls": [
337-
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_darwin-v11.6.zip",
338-
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_darwin-v11.6.zip",
337+
"https://mirror.bazel.build/bazel_java_tools/releases/java/v11.7.1/java_tools_darwin-v11.7.1.zip",
338+
"https://github.com/bazelbuild/java_tools/releases/download/java_v11.7.1/java_tools_darwin-v11.7.1.zip",
339339
],
340340
"used_in": [
341341
"additional_distfiles",

src/main/java/com/google/devtools/build/lib/analysis/BuildView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public AnalysisResult update(
410410
"Analysis succeeded for only %d of %d top-level targets",
411411
numSuccessful, numTargetsToAnalyze);
412412
eventHandler.handle(Event.info(msg));
413-
logger.atInfo().log(msg);
413+
logger.atInfo().log("%s", msg);
414414
}
415415

416416
AnalysisResult result;

src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private void reportError(
163163
// Don't hide unchecked exceptions as part of the error reporting.
164164
Throwables.throwIfUnchecked(exception);
165165

166-
logger.atSevere().withCause(exception).log(msg);
166+
logger.atSevere().withCause(exception).log("%s", msg);
167167
reportCommandLineError(commandLineReporter, exception);
168168
moduleEnvironment.exit(createAbruptExitException(exception, msg, besCode));
169169
}
@@ -254,7 +254,7 @@ private void waitForPreviousInvocation(boolean isShutdown) {
254254
+ "Cancelling and starting a new invocation...",
255255
waitedMillis / 1000, waitedMillis % 1000);
256256
reporter.handle(Event.warn(msg));
257-
logger.atWarning().withCause(exception).log(msg);
257+
logger.atWarning().withCause(exception).log("%s", msg);
258258
cancelCloseFutures = true;
259259
} catch (ExecutionException e) {
260260
String msg;
@@ -274,7 +274,7 @@ private void waitForPreviousInvocation(boolean isShutdown) {
274274
e.getMessage());
275275
}
276276
reporter.handle(Event.warn(msg));
277-
logger.atWarning().withCause(e).log(msg);
277+
logger.atWarning().withCause(e).log("%s", msg);
278278
cancelCloseFutures = true;
279279
} finally {
280280
if (cancelCloseFutures) {
@@ -671,7 +671,7 @@ private BuildEventServiceTransport createBesTransport(
671671
String.format(
672672
"Build Event Service uploads disabled due to a connectivity problem: %s", status);
673673
reporter.handle(Event.warn(message));
674-
logger.atWarning().log(message);
674+
logger.atWarning().log("%s", message);
675675
return null;
676676
}
677677

src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceUploader.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ ListenableFuture<Void> getHalfCloseFuture() {
293293

294294
private DetailedExitCode logAndSetException(
295295
String message, BuildProgress.Code bpCode, Throwable cause) {
296-
logger.atSevere().log(message);
296+
logger.atSevere().log("%s", message);
297297
DetailedExitCode detailedExitCode =
298298
DetailedExitCode.of(
299299
FailureDetail.newBuilder()
@@ -490,15 +490,15 @@ private void publishBuildEvents()
490490
String.format(
491491
"Expected ACK with seqNum=%d but received ACK with seqNum=%d",
492492
expected.getSequenceNumber(), actualSeqNum);
493-
logger.atInfo().log(message);
493+
logger.atInfo().log("%s", message);
494494
streamContext.abortStream(Status.FAILED_PRECONDITION.withDescription(message));
495495
}
496496
} else {
497497
String message =
498498
String.format(
499499
"Received ACK (seqNum=%d) when no ACK was expected",
500500
ackEvent.getSequenceNumber());
501-
logger.atInfo().log(message);
501+
logger.atInfo().log("%s", message);
502502
streamContext.abortStream(Status.FAILED_PRECONDITION.withDescription(message));
503503
}
504504
}
@@ -537,7 +537,7 @@ private void publishBuildEvents()
537537
if (!shouldRetryStatus(streamStatus)) {
538538
String message =
539539
String.format("Not retrying publishBuildEvents: status='%s'", streamStatus);
540-
logger.atInfo().log(message);
540+
logger.atInfo().log("%s", message);
541541
throw withFailureDetail(
542542
streamStatus.asException(),
543543
BuildProgress.Code.BES_STREAM_NOT_RETRYING_FAILURE,
@@ -548,7 +548,7 @@ private void publishBuildEvents()
548548
String.format(
549549
"Not retrying publishBuildEvents, no more attempts left: status='%s'",
550550
streamStatus);
551-
logger.atInfo().log(message);
551+
logger.atInfo().log("%s", message);
552552
throw withFailureDetail(
553553
streamStatus.asException(),
554554
BuildProgress.Code.BES_UPLOAD_RETRY_LIMIT_EXCEEDED_FAILURE,
@@ -636,7 +636,7 @@ private void publishLifecycleEvent(PublishLifecycleEventRequest request)
636636
if (!shouldRetryStatus(e.getStatus())) {
637637
String message =
638638
String.format("Not retrying publishLifecycleEvent: status='%s'", e.getStatus());
639-
logger.atInfo().log(message);
639+
logger.atInfo().log("%s", message);
640640
throw withFailureDetail(e, BuildProgress.Code.BES_STREAM_NOT_RETRYING_FAILURE, message);
641641
}
642642

src/main/java/com/google/devtools/build/lib/buildeventstream/transports/FileTransport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private void exitFailure(Throwable e) {
186186
.build()),
187187
e));
188188
pendingWrites.clear();
189-
logger.atSevere().withCause(e).log(message);
189+
logger.atSevere().withCause(e).log("%s", message);
190190
}
191191

192192
private static BuildProgress.Code getBuildProgressCode(Throwable e) {

src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ private static void logDeleteTreeFailure(
578578
for (Path entry : entries) {
579579
directoryDetails.append(" '").append(entry.getBaseName()).append("'");
580580
}
581-
logger.atWarning().log(directoryDetails.toString());
581+
logger.atWarning().log("%s", directoryDetails);
582582
} catch (IOException e) {
583583
logger.atWarning().withCause(e).log("'%s' exists but could not be read", directory);
584584
}

src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ private void stepLog(
251251
Level level, @Nullable Throwable cause, @FormatString String fmt, Object... args) {
252252
String msg = String.format(fmt, args);
253253
String toLog = String.format("%s (#%d %s)", msg, id, desc());
254-
logger.at(level).withCause(cause).log(toLog);
254+
logger.at(level).withCause(cause).log("%s", toLog);
255255
}
256256

257257
private String desc() {

src/main/java/com/google/devtools/build/lib/platform/SystemSuspensionModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ synchronized void suspendCallback(int reason) {
5959
String logString = event.logString();
6060
reporter.handle(Event.info(logString));
6161
reporter.post(event);
62-
logger.atInfo().log(logString);
62+
logger.atInfo().log("%s", logString);
6363
}
6464
}
6565
}

src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ public void afterCommand() throws AbruptExitException {
868868
failure = e;
869869
failureCode = Code.RPC_LOG_FAILURE;
870870
failureMessage = "Partially wrote rpc log file";
871-
logger.atWarning().withCause(e).log(failureMessage);
871+
logger.atWarning().withCause(e).log("%s", failureMessage);
872872
}
873873

874874
executorService = null;

src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ DetailedExitCode parseStarlarkOptions(CommandEnvironment env, ExtendedEventHandl
274274
StarlarkOptionsParser.newStarlarkOptionsParser(env, optionsParser).parse(eventHandler);
275275
} catch (OptionsParsingException e) {
276276
String logMessage = "Error parsing Starlark options";
277-
logger.atInfo().withCause(e).log(logMessage);
277+
logger.atInfo().withCause(e).log("%s", logMessage);
278278
return processOptionsParsingException(
279279
eventHandler, e, logMessage, Code.STARLARK_OPTIONS_PARSE_FAILURE);
280280
}
@@ -343,7 +343,7 @@ DetailedExitCode parseOptions(List<String> args, ExtendedEventHandler eventHandl
343343
}
344344
} catch (OptionsParsingException e) {
345345
String logMessage = "Error parsing options";
346-
logger.atInfo().withCause(e).log(logMessage);
346+
logger.atInfo().withCause(e).log("%s", logMessage);
347347
return processOptionsParsingException(
348348
eventHandler, e, logMessage, Code.OPTIONS_PARSE_FAILURE);
349349
} catch (InterruptedException e) {

src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ private static int batchMain(Iterable<BlazeModule> modules, String[] args) {
947947

948948
try {
949949
logger.atInfo().log(
950-
SafeRequestLogging.getRequestLogString(commandLineOptions.getOtherArgs()));
950+
"%s", SafeRequestLogging.getRequestLogString(commandLineOptions.getOtherArgs()));
951951
BlazeCommandResult result =
952952
dispatcher.exec(
953953
policy,

src/main/java/com/google/devtools/build/lib/runtime/BuildSummaryStatsModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void buildComplete(BuildCompleteEvent event) {
138138
event.getResult().getBuildToolLogCollection()
139139
.addDirectValue(
140140
"critical path", criticalPath.toString().getBytes(StandardCharsets.UTF_8));
141-
logger.atInfo().log(criticalPath.toString());
141+
logger.atInfo().log("%s", criticalPath);
142142
logger.atInfo().log(
143143
"Slowest actions:\n %s",
144144
Joiner.on("\n ").join(criticalPathComputer.getSlowestComponents()));

src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ private void executeCommand(RunRequest request, BlockingStreamObserver<RunRespon
545545
.collect(ImmutableList.toImmutableList());
546546

547547
InvocationPolicy policy = InvocationPolicyParser.parsePolicy(request.getInvocationPolicy());
548-
logger.atInfo().log(SafeRequestLogging.getRequestLogString(args));
548+
logger.atInfo().log("%s", SafeRequestLogging.getRequestLogString(args));
549549
result =
550550
dispatcher.exec(
551551
policy,

src/main/java/com/google/devtools/build/lib/server/ShutdownHooks.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ private static void printStack(IOException e) {
8484
printErr.println("=======[BAZEL SERVER: ENCOUNTERED IO EXCEPTION]=======");
8585
e.printStackTrace(printErr);
8686
printErr.println("=====================================================");
87-
logger.atSevere().log(err.toString());
87+
logger.atSevere().log("%s", err);
8888
}
8989
}

src/main/java/com/google/devtools/build/lib/shell/Command.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public int available() {
410410
}
411411

412412
private static void processInput(InputStream stdinInput, Subprocess process) {
413-
logger.atFiner().log(stdinInput.toString());
413+
logger.atFiner().log("%s", stdinInput);
414414
try (OutputStream out = process.getOutputStream()) {
415415
ByteStreams.copy(stdinInput, out);
416416
} catch (IOException ioe) {

src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ private static void logDiffInfo(
651651
}
652652
}
653653

654-
logger.atInfo().log(result.toString());
654+
logger.atInfo().log("%s", result);
655655
}
656656

657657
private static int getNumberOfModifiedFiles(Iterable<SkyKey> modifiedValues) {

src/tools/android/java/com/google/devtools/build/android/desugar/testing/junit/DesugarRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ static final class VacuousSuccess extends Statement {
267267

268268
@Override
269269
public void evaluate() throws Throwable {
270-
logger.atWarning().log(reason);
270+
logger.atWarning().log("%s", reason);
271271
}
272272

273273
@Override

src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/ExecutionServer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ private ActionResult execute(
331331
String.format(
332332
"Command:\n%s\nexceeded deadline of %f seconds.",
333333
Arrays.toString(command.getArgumentsList().toArray()), timeoutMillis / 1000.0);
334-
logger.atWarning().log(errMessage);
334+
logger.atWarning().log("%s", errMessage);
335335
errStatus =
336336
Status.newBuilder()
337337
.setCode(Code.DEADLINE_EXCEEDED.getNumber())

0 commit comments

Comments
 (0)