Merge "Fix formatting string in PolicyVersionUpgrade"

This commit is contained in:
Michael Wright
2022-02-07 18:47:07 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ java_defaults {
"-Xep:NullTernary:ERROR",
"-Xep:TryFailThrowable:ERROR",
"-Xep:HashtableContains:ERROR",
"-Xep:FormatString:ERROR",
// NOTE: only enable to generate local patchfiles
// "-XepPatchChecks:refaster:frameworks/base/errorprone/refaster/EfficientXml.java.refaster",
// "-XepPatchLocation:/tmp/refaster/",

View File

@@ -184,7 +184,7 @@ public class PolicyVersionUpgrader {
Files.write(file.toPath(), versionBytes);
versionFile.commit();
} catch (IOException e) {
Slog.e(LOG_TAG, String.format("Writing version %d failed: %s", version), e);
Slog.e(LOG_TAG, String.format("Writing version %d failed", version), e);
versionFile.rollback();
}
}