aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputSuppressWarningsHolder5.java
blob: fbefdd486ec3ae3c04b5d0dbcd8cf6da94769c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.puppycrawl.tools.checkstyle.checks;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.util.List;
import java.util.Map;


public class InputSuppressWarningsHolder5{

    public static Object foo1(@SuppressWarnings("unsused") Object str) {
        String myString = (@SuppressWarnings("unsused") String) str;
        Object object = new @SuppressWarnings("unsused") Object();
        try {
            return null;
            
        } catch (@SuppressWarnings("unsused") Exception ex) {
            return "";
        }
    }

    void foo2() throws @SuppressWarnings("unsused") Exception {  }

    public void foo3() {
        Map.@SuppressWarnings("unsused") Entry entry;
        MyObject myObject = new MyObject();
        myObject.<@SuppressWarnings("unsused") String>myMethod();
        myObject.new @SuppressWarnings("unsused") MyObject2();
    }

    public static <T> void foo4(Object str) {
        List<@SuppressWarnings("unsused") ? extends Comparable<T>> unchangeable;
    }

    abstract class UnmodifiableList<T>
    implements @SuppressWarnings("unsused") List<@SuppressWarnings("unsused") T> {
    }

    class MyObject{
        
        public void myMethod(){};
        
        class MyObject2{}
    }

    @Target(ElementType.TYPE_USE)
    @interface SuppressWarnings {
        String value();
    }
}