[ https://issues.apache.org/jira/browse/CODEC-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Herbert resolved CODEC-261. -------------------------------- Fix Version/s: 1.14 Resolution: Fixed The modifications to fix CODEC-259 have fixed this issue. Added a test to master to demonstrate encoding of a read-only ByteBuffer. > Unable to encode read-only ByteBuffer > ------------------------------------- > > Key: CODEC-261 > URL: https://issues.apache.org/jira/browse/CODEC-261 > Project: Commons Codec > Issue Type: Bug > Affects Versions: 1.13 > Reporter: James Howe > Priority: Major > Fix For: 1.14 > > > A read-only array-backed {{ByteBuffer}} fails to encode, because the backing > array is not accessible. > {code:java} > Hex.encodeHex(ByteBuffer.wrap(new byte[]{1}).asReadOnlyBuffer()) > {code} > {noformat} > java.nio.ReadOnlyBufferException > at java.nio.ByteBuffer.array(ByteBuffer.java:996) > at org.apache.commons.codec.binary.Hex.encodeHex(Hex.java:213) > at org.apache.commons.codec.binary.Hex.encodeHex(Hex.java:172) > at org.apache.commons.codec.binary.Hex.encodeHex(Hex.java:140) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)