aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/requirethis/InputRequireThisMetodReferences.java
blob: 516b85aed110e542da6934be5cb9bb1ffc0349c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.puppycrawl.tools.checkstyle.checks.coding.requirethis;

import java.util.Arrays;
import java.util.Collections;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;

public class InputRequireThisMetodReferences {
    private Set<String> tags = Collections.unmodifiableSortedSet(
        Arrays.stream(new String[] {"br", "li", "dt", "dd", "hr", "img", "p", "td", "tr", "th",})
            .collect(Collectors.toCollection(TreeSet::new)));

    public InputRequireThisMetodReferences(Set<String> tags) {
        tags = tags; // violation
    }

    public InputRequireThisMetodReferences() {
        this.tags = Arrays.stream(
            new String[] {"br", "li", "dt", "dd", "hr", "img", "p", "td", "tr", "th",})
            .collect(Collectors.toCollection(TreeSet::new));
    }
}