Skip to content

Commit

Permalink
use ByteString.toArrayUnsafe() (#1369)
Browse files Browse the repository at this point in the history
akka 2.5 does not support toArrayUnsafe()
  • Loading branch information
pjfanning authored Oct 10, 2024
1 parent 07436ee commit c2338f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 c2338f6

Please sign in to comment.