1
2
3
4
5
6
7
8
9
10 package com.puppycrawl.tools.checkstyle.checks.coding.multiplestringliterals;
11
12 public class InputMultipleStringLiterals4
13 {
14 String m = "StringContents";
15 String m1 = "SingleString";
16 String m2 = "DoubleString" + "DoubleString";
17 String m3 = "" + "";
18 String m4 = "" + "";
19 String debugStr = ", " + ", " + ", ";
20
21 void method1() {
22 String a1 = "StringContents";
23 System.identityHashCode("StringContents");
24
25 String a2 = "String" + "Contents";
26 }
27
28 @SuppressWarnings("unchecked")
29 void method2(){}
30
31 @SuppressWarnings("unchecked")
32 void method3(){}
33
34 @SuppressWarnings("unchecked")
35 void method4(){}
36
37 @SuppressWarnings("unchecked")
38 void method5(){}
39 }