Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/WrongAnnotation.java:9: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( " public static void foobar(View view, @SuppressLint(\"NewApi\") int foo) { // Invalid: class-file check\n" + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:10: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint(\"NewApi\") // Invalid\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:12: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint({\"SdCardPath\", \"NewApi\"}) // Invalid: class-file based check on local variable\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:14: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @android.annotation.SuppressLint({\"SdCardPath\", \"NewApi\"}) // Invalid (FQN)\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:28: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint(\"NewApi\")\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "5 errors, 0 warnings\n" ) ) , lintProject ( "src/test/pkg/WrongAnnotation.java.txt=>src/test/pkg/WrongAnnotation.java" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "src/test/pkg/WrongAnnotation.java:9: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" + " public static void foobar(View view, @SuppressLint(\"NewApi\") int foo) { // Invalid: class-file check\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:10: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint(\"NewApi\") // Invalid\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:12: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint({\"SdCardPath\", \"NewApi\"}) // Invalid: class-file based check on local variable\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:14: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @android.annotation.SuppressLint({\"SdCardPath\", \"NewApi\"}) // Invalid (FQN)\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:28: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint(\"NewApi\")\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/WrongAnnotation.java:33: Error: The @SuppressLint annotation cannot be used on a local variable with the lint check \'NewApi\': move out to the surrounding method [LocalSuppress]\n" ) + " @SuppressLint(\"NewApi\") // Invalid\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "6 errors, 0 warnings\n" ) ) , lintProject ( "src/test/pkg/WrongAnnotation.java.txt=>src/test/pkg/WrongAnnotation.java" ) ) ; }