aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/decwStrings.java
blob: ef392a669825afc93f499b0cd5f2b74648a0c4a0 (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
class WarningSample {

	  public void method() {}
	  public void anotherMethod() {
	    this.method();
	  }

	}

	aspect WarningAspect {

	  pointcut illegalCall(): call(* WarningSample.method())
	                && within(WarningSample);

	  // the same thing happens with declare error
	  declare warning: illegalCall() : "Hey, don't " +
	      "do that, that is not nice. You should do something else";

	  public void e1() {}
	  declare warning: execution(* e1(..)): "hello " + /* comment */ "world";

	  public void e2() {}
	  declare warning: execution(* e2(..)): "hello " /* comment */ + "world";
	  
	  public void e3() {}
	  declare warning: execution(* e3(..)): "hello " + // commenthere
	  // comment here too
	  "world";
	  
	  public void e4() {}
	  declare warning: execution(* e4()): "hello " //xxx
	  	+ "world";
	  
	  public void e5() {}
	  declare warning: execution(* e5()): "hello " //xxx
	  	/* here */
	  	+ "world";
	  	
	  public void e6() {}
	  declare warning: execution(* e6()): "abc" +
 "def" + // def was here
 "ghijklmnopqrstuv" /* silly
place
for a 
comment */ +
/* oops */
 "wxyz";
	}