mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge pull request #22212 from XenoAmess
* gh-22212: Polish "Remove redundant bitwise operations" Remove redundant bitwise operations Closes gh-22212
This commit is contained in:
commit
0200a3783b
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 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.
|
||||
@ -72,12 +72,12 @@ class Frame {
|
||||
void write(OutputStream outputStream) throws IOException {
|
||||
outputStream.write(0x80 | this.type.code);
|
||||
if (this.payload.length < 126) {
|
||||
outputStream.write(0x00 | (this.payload.length & 0x7F));
|
||||
outputStream.write(this.payload.length & 0x7F);
|
||||
}
|
||||
else {
|
||||
outputStream.write(0x7E);
|
||||
outputStream.write(this.payload.length >> 8 & 0xFF);
|
||||
outputStream.write(this.payload.length >> 0 & 0xFF);
|
||||
outputStream.write(this.payload.length & 0xFF);
|
||||
}
|
||||
outputStream.write(this.payload);
|
||||
outputStream.flush();
|
||||
|
Loading…
Reference in New Issue
Block a user