1
2
3
4
5
6
7
8
9
10 package com.puppycrawl.tools.checkstyle.checks.coding.requirethis;
11
12 class InputRequireThisAllowLocalVars {
13
14 private String s1 = "foo1";
15 String s2 = "foo2";
16
17 InputRequireThisAllowLocalVars() {
18 s1 = "bar1";
19 String s2;
20 s2 = "bar2";
21 }
22
23 public int getS1() {
24 String s1 = null;
25 s1 = "bar";
26 s1 = s1;
27 return 1;
28 }
29
30 public String getS1(String param) {
31 String s1 = null;
32 s1 = param;
33 s1 += s1;
34 return s1;
35 }
36
37 String getS2() {
38 String s2 = null;
39 s2+=s2;
40 return "return";
41 }
42
43 String getS2(String s2) {
44 s2 = null;
45 return s2;
46 }
47
48 String getS2(int a) {
49 String s2 = " ";
50 s2 += s2;
51 return s1;
52 }
53 }