Skip to content

Commit fc4950f

Browse files
authored
Merge branch 'master' into WebSocketServerCodeQuality
2 parents 4b3f9ad + 2d5d49b commit fc4950f

File tree

8 files changed

+74
-67
lines changed

8 files changed

+74
-67
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. .
13+
2. ..
14+
3. ...
15+
4. ....
16+
17+
**Example application to reproduce the issue**
18+
A link to a github project/gist to reproduce the issue.
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Debug log**
24+
The the debug log ('WebSocketImpl.DEBUG = true') to help explain your problem.
25+
26+
**Environment(please complete the following information):**
27+
- Version used:
28+
- Java version:
29+
- Operating System and version:
30+
- Endpoint Name and version:
31+
- Link to your project:
32+
33+
**Additional context**
34+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or links about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Question
3+
about: Question on how to use or achieve something
4+
5+
---
6+
7+
**Describe what you would like to know or do**
8+
A clear and concise description of what the problem is.
9+
10+
**Describe the solution you'd considered**
11+
A clear and concise description of any solutions you've considered.
12+
13+
**Additional context**
14+
Add any other context or links about the question here.

README.markdown

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -109,33 +109,6 @@ Minimum Required JDK
109109
Other JRE implementations may work as well, but haven't been tested.
110110

111111

112-
Testing in Android Emulator
113-
---------------------------
114-
115-
Please note Android Emulator has issues using `IPv6 addresses`. Executing any
116-
socket related code (like this library) inside it will address an error
117-
118-
``` bash
119-
java.net.SocketException: Bad address family
120-
```
121-
122-
You have to manually disable `IPv6` by calling
123-
124-
``` java
125-
java.lang.System.setProperty("java.net.preferIPv6Addresses", "false");
126-
java.lang.System.setProperty("java.net.preferIPv4Stack", "true");
127-
```
128-
129-
somewhere in your project, before instantiating the `WebSocketClient` class.
130-
You can check if you are currently testing in the Android Emulator like this
131-
132-
``` java
133-
if ("google_sdk".equals( Build.PRODUCT )) {
134-
// ... disable IPv6
135-
}
136-
```
137-
138-
139112
License
140113
-------
141114

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99
}
1010

1111
group = 'org.java_websocket'
12-
version = '1.3.8'
12+
version = '1.4.0-SNAPSHOT'
1313
sourceCompatibility = 1.6
1414
targetCompatibility = 1.6
1515

@@ -25,6 +25,10 @@ configure(install.repositories.mavenInstaller) {
2525

2626
dependencies {
2727
deployerJars "org.apache.maven.wagon:wagon-webdav:1.0-beta-2"
28+
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
29+
testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
30+
testCompile group: 'junit', name: 'junit', version: '4.11'
31+
testCompile group: 'org.json', name: 'json', version: '20180130'
2832
}
2933

3034

src/test/java/org/java_websocket/autobahn/AutobahnServerResults.java renamed to src/test/java/org/java_websocket/autobahn/AutobahnServerResultsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
import static org.junit.Assert.assertEquals;
3838

39-
public class AutobahnServerResults {
39+
public class AutobahnServerResultsTest {
4040

4141
static JSONObject jsonObject = null;
4242

src/test/java/org/java_websocket/framing/CloseFrameTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public void testExtends() {
6363
@Test
6464
public void testToString() {
6565
CloseFrame frame = new CloseFrame();
66-
assertEquals("Frame toString must include a close code", "Framedata{ optcode:CLOSING, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:2], payload:\u0003è}code: 1000",frame.toString());
66+
String frameString = frame.toString();
67+
frameString = frameString.replaceAll("payload:(.*)}", "payload: *}");
68+
assertEquals("Frame toString must include a close code", "Framedata{ optcode:CLOSING, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:2], payload: *}code: 1000", frameString);
6769
}
6870

6971

0 commit comments

Comments
 (0)