Source:
<code>private static void setProperty(javax.jms.Message msg, String key, Object value) throws JMSException { if (value instanceof UnsignedLong) { long v = ((UnsignedLong) value).longValue(); msg.setLongProperty(key, v); } else if (value instanceof UnsignedInteger) { long v = ((UnsignedInteger) value).longValue(); if (Integer.MIN_VALUE <= v && v <= Integer.MAX_VALUE) { msg.setIntProperty(key, (int) v); } else { msg.setLongProperty(key, v); } } else if (value instanceof UnsignedShort) { int v = ((UnsignedShort) value).intValue(); if (Short.MIN_VALUE <= v && v <= Short.MAX_VALUE) { msg.setShortProperty(key, (short) v); } else { msg.setIntProperty(key, v); } } else if (value instanceof UnsignedByte) { short v = ((UnsignedByte) value).shortValue(); if (Byte.MIN_VALUE <= v && v <= Byte.MAX_VALUE) { msg.setByteProperty(key, (byte) v); } else { msg.setShortProperty(key, v); } } else if (value instanceof Symbol) { msg.setStringProperty(key, value.toString()); } else if (value instanceof Decimal128) { msg.setDoubleProperty(key, ((Decimal128) value).doubleValue()); } else if (value instanceof Decimal64) { msg.setDoubleProperty(key, ((Decimal64) value).doubleValue()); } else if (value instanceof Decimal32) { msg.setFloatProperty(key, ((Decimal32) value).floatValue()); } else if (value instanceof Binary) { <START> msg.setObjectProperty(key, ((Binary) value).getArray()); <END> } else { msg.setObjectProperty(key, value); } }</code><technical_language>This a complete fix Binary a subsequence of some other array possibly a slice another buffer owned else need copy this if Binary array offset relative length match underlying array end a other side match original scoped array contents</technical_language>

Target:
private static void setProperty(javax.jms.Message msg, String key, Object value) throws JMSException { if (value instanceof UnsignedLong) { long v = ((UnsignedLong) value).longValue(); msg.setLongProperty(key, v); } else if (value instanceof UnsignedInteger) { long v = ((UnsignedInteger) value).longValue(); if (Integer.MIN_VALUE <= v && v <= Integer.MAX_VALUE) { msg.setIntProperty(key, (int) v); } else { msg.setLongProperty(key, v); } } else if (value instanceof UnsignedShort) { int v = ((UnsignedShort) value).intValue(); if (Short.MIN_VALUE <= v && v <= Short.MAX_VALUE) { msg.setShortProperty(key, (short) v); } else { msg.setIntProperty(key, v); } } else if (value instanceof UnsignedByte) { short v = ((UnsignedByte) value).shortValue(); if (Byte.MIN_VALUE <= v && v <= Byte.MAX_VALUE) { msg.setByteProperty(key, (byte) v); } else { msg.setShortProperty(key, v); } } else if (value instanceof Symbol) { msg.setStringProperty(key, value.toString()); } else if (value instanceof Decimal128) { msg.setDoubleProperty(key, ((Decimal128) value).doubleValue()); } else if (value instanceof Decimal64) { msg.setDoubleProperty(key, ((Decimal64) value).doubleValue()); } else if (value instanceof Decimal32) { msg.setFloatProperty(key, ((Decimal32) value).floatValue()); } else if (value instanceof Binary) { Binary bin = (Binary) value; msg.setObjectProperty(key, Arrays.copyOfRange(bin.getArray(), bin.getArrayOffset(), bin.getLength())); } else { msg.setObjectProperty(key, value); } }