@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2021 the original author or authors .
* Copyright 2002 - 2023 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -239,11 +239,12 @@ public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
@@ -239,11 +239,12 @@ public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
public long [ ] getHeartbeat ( ) {
String rawValue = getFirstNativeHeader ( STOMP_HEARTBEAT_HEADER ) ;
int pos = rawValue ! = null ? rawValue . indexOf ( ',' ) : - 1 ;
int pos = ( rawValue ! = null ? rawValue . indexOf ( ',' ) : - 1 ) ;
if ( pos = = - 1 ) {
return Arrays . copyOf ( DEFAULT_HEARTBEAT , 2 ) ;
}
return new long [ ] { Long . parseLong ( rawValue , 0 , pos , 10 ) , Long . parseLong ( rawValue , pos + 1 , rawValue . length ( ) , 10 ) } ;
return new long [ ] { Long . parseLong ( rawValue , 0 , pos , 10 ) ,
Long . parseLong ( rawValue , pos + 1 , rawValue . length ( ) , 10 ) } ;
}
public void setAcceptVersion ( String acceptVersion ) {