Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b66aedfe authored by William Escande's avatar William Escande
Browse files

ErrorProne: Enforce & fix InvalidBlockTag

See https://errorprone.info/bugpattern/InvalidBlockTag

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: Exempt Build and test only
Change-Id: Iee760800a6d0e361b40f1f0c9884b9c54ad8534d
parent 566fd385
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ android_app {
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:BadImport:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
            "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files
+4 −5
Original line number Diff line number Diff line
@@ -705,6 +705,10 @@ public class BluetoothMapUtils {
        return result.getBytes(); /* return the result as "UTF-8" bytes */
    }

    private static final byte ESCAPE_CHAR = '=';
    private static final byte TAB = 9;
    private static final byte SPACE = 32;

    /**
     * Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe
     * characters are escaped. Simplified version of encoder from QuetedPrintableCodec.java (Apache
@@ -713,11 +717,6 @@ public class BluetoothMapUtils {
     * @param bytes array of bytes to be encoded
     * @return UTF-8 string containing quoted-printable characters
     */
    private static final byte ESCAPE_CHAR = '=';

    private static final byte TAB = 9;
    private static final byte SPACE = 32;

    public static final String encodeQuotedPrintable(byte[] bytes) {
        if (bytes == null) {
            return null;
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ java_defaults {
            "-Xep:CatchFail:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:EmptyCatch:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:InvalidInlineTag:ERROR",
            "-Xep:NonApiType:ERROR",
            "-Xep:StringCharset:ERROR",
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ java_sdk_library {
            "-Xep:CatchFail:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:EmptyCatch:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:InvalidInlineTag:ERROR",
            "-Xep:NonApiType:ERROR",
            "-Xep:StringCharset:ERROR",
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ java_defaults {
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:EmptyCatch:ERROR",
            "-Xep:EqualsIncompatibleType:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:InvalidInlineTag:ERROR",
            "-Xep:NonApiType:ERROR",
            "-Xep:ReferenceEquality:ERROR",