aboutsummaryrefslogtreecommitdiffstats
path: root/lint/libs/lint_checks/tests/src/com/android/tools/lint/checks/data/src/test/pkg/WrongAnnotation.java.txt
blob: 9256055c52169e6bae6f6a57620ace09cb42f2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.example.test2;

import android.annotation.SuppressLint;

public class WrongAnnotation {
    @Override
    @SuppressLint("NewApi") // Valid: class-file check on method
    public static void foobar(View view, @SuppressLint("NewApi") int foo) { // Invalid: class-file check
        @SuppressLint("NewApi") // Invalid
        boolean a;
        @SuppressLint({"SdCardPath", "NewApi"}) // Invalid: class-file based check on local variable
        boolean b;
        @android.annotation.SuppressLint({"SdCardPath", "NewApi"}) // Invalid (FQN)
        boolean c;
        @SuppressLint("SdCardPath") // Valid: AST-based check
        boolean d;
    }
}