# HG changeset patch # User coleenp # Date 1456061639 18000 # Node ID 9fd1bf883f3ca566d9ca4ca364c814ddce4d117c # Parent 444a8c40cf959a7c408b8fcb2a09c33bf3351abf 8150012: Better byte behavior for reflection Reviewed-by: kvn, jrose, kevinw, ahgross diff -r 444a8c40cf95 -r 9fd1bf883f3c hotspot/src/share/vm/oops/typeArrayOop.hpp --- a/hotspot/src/share/vm/oops/typeArrayOop.hpp Sat Feb 20 14:11:18 2016 -0800 +++ b/hotspot/src/share/vm/oops/typeArrayOop.hpp Sun Feb 21 08:33:59 2016 -0500 @@ -96,7 +96,7 @@ void byte_at_put(int which, jbyte contents) { *byte_at_addr(which) = contents; } jboolean bool_at(int which) const { return *bool_at_addr(which); } - void bool_at_put(int which, jboolean contents) { *bool_at_addr(which) = contents; } + void bool_at_put(int which, jboolean contents) { *bool_at_addr(which) = (((jint)contents) & 1); } jchar char_at(int which) const { return *char_at_addr(which); } void char_at_put(int which, jchar contents) { *char_at_addr(which) = contents; }