1   package com.puppycrawl.tools.checkstyle.checks.coding.requirethis;
2   
3   import java.util.Arrays;
4   import java.util.Collections;
5   import java.util.Set;
6   import java.util.TreeSet;
7   import java.util.stream.Collectors;
8   
9   public class InputRequireThisMethodReferences {
10      private Set<String> tags = Collections.unmodifiableSortedSet(
11          Arrays.stream(new String[] {"br", "li", "dt", "dd", "hr", "img", "p", "td", "tr", "th",})
12              .collect(Collectors.toCollection(TreeSet::new)));
13  
14      public InputRequireThisMethodReferences(Set<String> tags) {
15          tags = tags; // violation
16      }
17  
18      public InputRequireThisMethodReferences() {
19          this.tags = Arrays.stream(
20              new String[] {"br", "li", "dt", "dd", "hr", "img", "p", "td", "tr", "th",})
21              .collect(Collectors.toCollection(TreeSet::new));
22      }
23  }