--- old/src/java.base/share/classes/java/lang/System.java 2018-10-31 14:22:40.355954530 +0100 +++ new/src/java.base/share/classes/java/lang/System.java 2018-10-31 14:22:40.235954625 +0100 @@ -533,6 +533,36 @@ int length); /** + * Set bit atomically + * @param bits bits + * @param index index + */ + @HotSpotIntrinsicCandidate + public static void setBit(byte[] bits, int index) { + throw new UnsupportedOperationException(); + } + + /** + * Clear bit atomically + * @param bits bits + * @param index index + */ + @HotSpotIntrinsicCandidate + public static void clrBit(byte[] bits, int index) { + throw new UnsupportedOperationException(); + } + + /** + * Get bit + * @param bits bits + * @param index index + * @return value + */ + public static boolean isBit(byte[] bits, int index) { + return ((bits[index>>3] >> (index & 7)) & 1) == 1; + } + + /** * Returns the same hash code for the given object as * would be returned by the default method hashCode(), * whether or not the given object's class overrides