changeset 5921:1e698c95d399

8150012: Better byte behavior for reflection Reviewed-by: kvn, jrose, kevinw, ahgross
author coleenp
date Sun, 21 Feb 2016 08:33:59 -0500
parents 2370d9e77455
children 986d0464b2a9
files src/share/vm/oops/typeArrayOop.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/typeArrayOop.hpp	Wed Apr 13 17:26:35 2016 +0100
+++ b/src/share/vm/oops/typeArrayOop.hpp	Sun Feb 21 08:33:59 2016 -0500
@@ -125,7 +125,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; }