[billing] Fix Java 11 incompatibility for real

Attempt was made in commit 15aac7e6 but failed miserably
pull/1/head
Dom Eori 2022-04-03 20:35:47 +09:00
parent 8426771957
commit f5c15f52d0
1 changed files with 5 additions and 1 deletions

View File

@ -73,7 +73,11 @@ public class BillingController {
ByteBuffer sigbytes = ByteBuffer.allocate(15);
sigbytes.order(ByteOrder.LITTLE_ENDIAN);
sigbytes.putInt(0, val);
sigbytes.put(4, keychipId.getBytes(), 0, keychipId.getBytes().length);
// JDK 11 compatible version of put(int, byte[])
for (int i = 0, j = 4; i < keychipId.getBytes().length; i++, j++) {
sigbytes.put(j, keychipId.getBytes()[i]);
}
Signature sig;
try {