public static int setVolatile ( int modifier , boolean b ) { if ( b ) { return ( modifier | VOLATILE ) & ( ~ SYNCHRONIZED & ~ NATIVE & ~ INTERFACE & ~ ABSTRACT & ~ STRICT ) ; } else { return modifier & ~ VOLATILE ; } }
When set volatile non - field settings are cleared .