2323package com .eatthepath .pushy .apns .server ;
2424
2525import com .eatthepath .json .JsonSerializer ;
26- import com .eatthepath .uuid .FastUUID ;
2726import io .netty .buffer .ByteBuf ;
2827import io .netty .buffer .Unpooled ;
2928import io .netty .channel .ChannelFuture ;
@@ -277,7 +276,7 @@ private void handleEndOfStream(final ChannelHandlerContext context, final Http2S
277276 UUID apnsIdFromHeaders ;
278277
279278 try {
280- apnsIdFromHeaders = apnsIdSequence != null ? FastUUID . parseUUID (apnsIdSequence ) : UUID .randomUUID ();
279+ apnsIdFromHeaders = apnsIdSequence != null ? UUID . fromString (apnsIdSequence . toString () ) : UUID .randomUUID ();
281280 } catch (final IllegalArgumentException e ) {
282281 log .error ("Failed to parse `apns-id` header: {}" , apnsIdSequence , e );
283282 apnsIdFromHeaders = UUID .randomUUID ();
@@ -318,10 +317,10 @@ public void write(final ChannelHandlerContext context, final Object message, fin
318317
319318 final Http2Headers headers = new DefaultHttp2Headers ()
320319 .status (HttpResponseStatus .OK .codeAsText ())
321- .add (APNS_ID_HEADER , FastUUID . toString ( acceptNotificationResponse .getApnsId ()));
320+ .add (APNS_ID_HEADER , acceptNotificationResponse .getApnsId (). toString ( ));
322321
323322 acceptNotificationResponse .getApnsUniqueId ()
324- .ifPresent (apnsUniqueId -> headers .add (APNS_UNIQUE_ID_HEADER , FastUUID .toString (apnsUniqueId )));
323+ .ifPresent (apnsUniqueId -> headers .add (APNS_UNIQUE_ID_HEADER , apnsUniqueId .toString ()));
325324
326325 this .encoder ().writeHeaders (context , acceptNotificationResponse .getStreamId (), headers , 0 , true , writePromise );
327326
@@ -332,10 +331,10 @@ public void write(final ChannelHandlerContext context, final Object message, fin
332331 final Http2Headers headers = new DefaultHttp2Headers ()
333332 .status (rejectNotificationResponse .getErrorReason ().getHttpResponseStatus ().codeAsText ())
334333 .add (HttpHeaderNames .CONTENT_TYPE , "application/json" )
335- .add (APNS_ID_HEADER , FastUUID . toString ( rejectNotificationResponse .getApnsId ()));
334+ .add (APNS_ID_HEADER , rejectNotificationResponse .getApnsId (). toString ( ));
336335
337336 rejectNotificationResponse .getApnsUniqueId ()
338- .ifPresent (apnsUniqueId -> headers .add (APNS_UNIQUE_ID_HEADER , FastUUID .toString (apnsUniqueId )));
337+ .ifPresent (apnsUniqueId -> headers .add (APNS_UNIQUE_ID_HEADER , apnsUniqueId .toString ()));
339338
340339 final byte [] payloadBytes ;
341340 {
0 commit comments