@NotThreadSafe Annotation
Description
Place @NotThreadSafe annotation on methods/classes that are not thread safe. Use the synchronize parameter to indicate which shared data the caller should synchronize, if any. Marking methods thread unsafe is not bad thing, since you are clearly documenting the threading contract.
Location
- Method
- Class
Annotation Parameters
- suppressErrors=true/false
Suppress any errors reported by CheckThread.
Example: @NotThreadSafe(suppressErrors=true)
Validation Performed by CheckThread
- Error if method is invoking a @ThreadConfined method