don't return inner bytes

This commit is contained in:
PJ Fanning 2025-08-03 14:47:10 +01:00
parent 75e9383a5c
commit 8df560eed2

View File

@ -109,11 +109,12 @@ public class ClassID implements Duplicatable, GenericRecord {
/**
* Gets the bytes making out the class ID. They are returned in correct order, i.e. big-endian.
* This no longer returns a reference to the internal byte array, but a copy of it.
*
* @return the bytes making out the class ID.
*/
public byte[] getBytes() {
return bytes;
return bytes.clone();
}
/**