Files
openide/plugins/devkit/devkit-java-tests/testData/threadingModelHelper/MethodsInDifferentClasses.java
Moncef Slimani 08fe7ab2bc [threading] IJPL-179707 Create initial Analyzer, Action, and Service classes for locking requirements analysis
GitOrigin-RevId: 97f4331731dca7808eddbe403789719c911c3523
2025-11-17 13:31:32 +00:00

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();
}
}
}