Skip to content

Commit

Permalink
fix #1237 Use ensureCapacity in ByteBufferVirtualObject
Browse files Browse the repository at this point in the history
http://bitnami/issues/7588
  • Loading branch information
WeltWeitBau authored and hlg committed Oct 11, 2023
1 parent 648d86b commit a1a7e95
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public ByteBufferVirtualObject(QueryContext reusable, EClass eClass, int capacit
this.uuid = reusable.getDatabaseInterface().newUuid();

int unsettedLength = reusable.getPackageMetaData().getUnsettedLength(eClass);
ensureCapacity(buffer.position(), 16 + unsettedLength);
buffer.put(new byte[unsettedLength]);
buffer.putLong(this.uuid.getMostSignificantBits());
buffer.putLong(this.uuid.getLeastSignificantBits());
Expand Down

0 comments on commit a1a7e95

Please sign in to comment.