import org.aspectj.testing.*; import java.util.*; public class StaticMethodsShouldNotReceiveInstanceofAdvice { public static void main(String[] args) { ClassWithStaticMethods.staticMethod(); Tester.checkAllEvents(); } static { Tester.expectEventsInString("good0"); } } class ClassWithStaticMethods { public static void staticMethod() {} } aspect PutsAdviceOnStaticMethods { static void bad(Object msg) { Tester.check(false, "Shouldn't have seen: " + msg); } static void good(String msg) { Tester.event(msg); } // These shouldn't run pointcut bad0(): this(ClassWithStaticMethods) && execution(void staticMethod()); pointcut bad1(ClassWithStaticMethods c): this(c) && execution(void staticMethod()); pointcut bad2(): target(ClassWithStaticMethods) && call(void staticMethod()); pointcut bad3(ClassWithStaticMethods c): target(c) && call(void staticMethod()); pointcut bad4(): target(*) && call(void ClassWithStaticMethods.staticMethod()); pointcut bad5(ClassWithStaticMethods c): target(c) && call(void staticMethod()); before(): bad0() { bad("bad0:" + thisJoinPoint); } before(ClassWithStaticMethods c): bad1(c) { bad("bad1:" + thisJoinPoint); } before(): bad2() { bad("bad2:" + thisJoinPoint); } before(ClassWithStaticMethods c): bad3(c) { bad("bad3:" + thisJoinPoint); } before(): bad4() { bad("bad4:" + thisJoinPoint); } before(ClassWithStaticMethods c): bad5(c) { bad("bad5:" + thisJoinPoint); } // This should run pointcut good0(): execution(void ClassWithStaticMethods.staticMethod()); before(): good0() { good("good0"); } } class='sub'>Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD: https://github.com/go-gitea/giteawww-data
summaryrefslogtreecommitdiffstats
path: root/options/gitignore/Otto
blob: 5aa263f9db03327b7a58a134f3a0005c280644af (plain)
1
pt_all



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































 
Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/l10n/sv.json
blob: 5733f077ab2cd31d453dc619fa1785e044767d55 (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