Fix formatting string in PolicyVersionUpgrade
The format string had an extra '%s' which was presumably for the Exception string, but Slog.e already captures that. Bug: 217923092 Test: errorprone build Change-Id: I523bd94b65f00bc0332a2c3e3c8ed28de2df1974
This commit is contained in:
@@ -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/",
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user