Avoid unnecessary boxing where primitives can be used
Closes gh-23267
This commit is contained in:
committed by
Sam Brannen
parent
2909de8829
commit
1728bf17fc
@@ -243,7 +243,7 @@ public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
|
||||
if (rawValues == null) {
|
||||
return Arrays.copyOf(DEFAULT_HEARTBEAT, 2);
|
||||
}
|
||||
return new long[] {Long.valueOf(rawValues[0]), Long.valueOf(rawValues[1])};
|
||||
return new long[] {Long.parseLong(rawValues[0]), Long.parseLong(rawValues[1])};
|
||||
}
|
||||
|
||||
public void setAcceptVersion(String acceptVersion) {
|
||||
|
||||
@@ -282,7 +282,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
|
||||
if (rawValues == null) {
|
||||
return null;
|
||||
}
|
||||
return new long[] {Long.valueOf(rawValues[0]), Long.valueOf(rawValues[1])};
|
||||
return new long[] {Long.parseLong(rawValues[0]), Long.parseLong(rawValues[1])};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user