[concurrency-interest] thread safety of java.lang.reflect.Field

Novi novitools.novi at web.de
Thu May 31 05:31:27 EDT 2018


I wonder if instances of java.lang.reflect.Field can be shared between
multiple threads as long as the accessibility flag is either not modified
or modified exactly once prior to a safe publication of the field

In other words, is it legal to cache instances of j.l.r.Field between
multiple threads?

Best Regards,

PS: The Bean Validation reference implementation Hibernate Validator seems
to cache instances of j.l.r.Field across threads. However, I couldn't find  
clue in the Java API documentation whether such a usage is supported or

More information about the Concurrency-interest mailing list