Skip to content

Commit

Permalink
use ByteString.toArrayUnsafe()
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Oct 2, 2024
1 parent a478d3b commit b75ad9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object AkkaPduProtobufCodecDecodeMessage {

@OnMethodEnter
def enter(@Argument(0) bs: ByteString, @Argument(1) provider: RemoteActorRefProvider, @Argument(2) localAddress: Address): Unit = {
val ackAndEnvelope = AckAndContextAwareEnvelopeContainer.parseFrom(bs.toArray)
val ackAndEnvelope = AckAndContextAwareEnvelopeContainer.parseFrom(bs.toArrayUnsafe())
if (ackAndEnvelope.hasEnvelope && ackAndEnvelope.getEnvelope.hasTraceContext) {
val remoteCtx = ackAndEnvelope.getEnvelope.getTraceContext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object AkkaPduProtobufCodecDecodeMessage {

@OnMethodEnter
@static def enter(@Argument(0) bs: ByteString, @Argument(1) provider: RemoteActorRefProvider, @Argument(2) localAddress: Address): Unit = {
val ackAndEnvelope = AckAndContextAwareEnvelopeContainer.parseFrom(bs.toArray)
val ackAndEnvelope = AckAndContextAwareEnvelopeContainer.parseFrom(bs.toArrayUnsafe())
if (ackAndEnvelope.hasEnvelope && ackAndEnvelope.getEnvelope.hasTraceContext) {
val remoteCtx = ackAndEnvelope.getEnvelope.getTraceContext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object PekkoPduProtobufCodecDecodeMessage {
@Argument(1) provider: RemoteActorRefProvider,
@Argument(2) localAddress: Address
): Unit = {
val ackAndEnvelope = AckAndContextAwareEnvelopeContainer.parseFrom(bs.toArray)
val ackAndEnvelope = AckAndContextAwareEnvelopeContainer.parseFrom(bs.toArrayUnsafe())
if (ackAndEnvelope.hasEnvelope && ackAndEnvelope.getEnvelope.hasTraceContext) {
val remoteCtx = ackAndEnvelope.getEnvelope.getTraceContext

Expand Down

0 comments on commit b75ad9d

Please sign in to comment.