Skip to content

Commit

Permalink
use ByteString.toArrayUnsafe()
Browse files Browse the repository at this point in the history
akka 2.5 does not support toArrayUnsafe()
  • Loading branch information
pjfanning committed Oct 2, 2024
1 parent a478d3b commit 839b601
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 839b601

Please sign in to comment.