mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-23 06:51:24 +07:00
28 lines
744 B
Java
28 lines
744 B
Java
import testutils.RequiresReadLock;
|
|
import testutils.ThreadingAssertions;
|
|
import testutils.ExpectedPath;
|
|
|
|
@ExpectedPath("MethodsInDifferentClasses.testMethod -> Helper.helperMethod -> Service.serviceMethod -> @RequiresReadLock")
|
|
@ExpectedPath("MethodsInDifferentClasses.testMethod -> Helper.helperMethod -> Service.serviceMethod -> ThreadingAssertions.assertReadAccess()")
|
|
class MethodsInDifferentClasses {
|
|
void testMethod() {
|
|
Helper helper = new Helper();
|
|
helper.helperMethod();
|
|
}
|
|
|
|
class Helper {
|
|
void helperMethod() {
|
|
Service service = new Service();
|
|
service.serviceMethod();
|
|
}
|
|
}
|
|
|
|
class Service {
|
|
@RequiresReadLock
|
|
void serviceMethod() {
|
|
ThreadingAssertions.assertReadAccess();
|
|
}
|
|
}
|
|
}
|
|
|