Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 044c170

Browse files
Gustavo AvilaGustavo Avila
Gustavo Avila
authored and
Gustavo Avila
committed
Bug fix with messages longer than 65k
Co-authored-by: Ivan Kalinin <pupssman@gmail.com>"
1 parent 5e1f499 commit 044c170

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ This library is published into JCenter and Maven Central.
66

77
### Gradle
88
```
9-
compile 'tech.gusavila92:java-android-websocket-client:1.2.0'
9+
compile 'tech.gusavila92:java-android-websocket-client:1.2.1'
1010
```
1111
### Maven
1212
```
1313
<dependency>
1414
<groupId>tech.gusavila92</groupId>
1515
<artifactId>java-android-websocket-client</artifactId>
16-
<version>1.2.0</version>
16+
<version>1.2.1</version>
1717
<type>pom</type>
1818
</dependency>
1919
```

‎build.gradle‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bintray {
1616
repo = 'maven'
1717
name = 'java-android-websocket-client'
1818
version {
19-
name = '1.2.0'
19+
name = '1.2.1'
2020
gpg {
2121
sign = true
2222
passphrase = System.getenv('BINTRAY_GPG_PASSPHRASE')
@@ -64,7 +64,7 @@ publishing {
6464
artifact javadocJar
6565
groupId 'tech.gusavila92'
6666
artifactId 'java-android-websocket-client'
67-
version '1.2.0'
67+
version '1.2.1'
6868
pom.withXml {
6969
def root = asNode()
7070
root.appendNode('name', 'Java/Android WebSocket Client')

‎src/main/java/tech/gusavila92/websocketclient/common/Utils.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ public static byte[] to2ByteArray(int value) {
1818
}
1919

2020
/**
21-
* Converts the int value passed as parameter to a 8 byte array
21+
* Converts the int value passed as parameter to a 8 byte array.
22+
* Even though the specification allows payloads with sizes greater than 32 bits,
23+
* Java only allows integers with 32 bit size, so the first 4 bytes will be zeroes.
2224
*
2325
* @param value
2426
* @return
2527
*/
2628
public static byte[] to8ByteArray(int value) {
27-
return new byte[] { (byte) (value >>> 56), (byte) (value >>> 48), (byte) (value >>> 40), (byte) (value >>> 32),
29+
return new byte[] { 0, 0, 0, 0,
2830
(byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value };
2931
}
3032

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /