Skip to content

Commit 7ca7c69

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 1270c99 + 19e7ab4 commit 7ca7c69

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎core-java/src/test/java/com/baeldung/java/nio2/async/AsyncEchoClient.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public String sendMessage(String message) {
5656
readResult.get();
5757
} catch (Exception e) {
5858
e.printStackTrace();
59+
}
5960
String echo = new String(buffer.array()).trim();
6061
buffer.clear();
6162
return echo;
@@ -73,7 +74,7 @@ public static void main(String[] args) throws Exception {
7374
AsyncEchoClient client = AsyncEchoClient.getInstance();
7475
client.start();
7576
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
76-
String line = null;
77+
String line;
7778
System.out.println("Message to server:");
7879
while ((line = br.readLine()) != null) {
7980
String response = client.sendMessage(line);

‎spring-mvc-java/src/test/java/com/baeldung/htmlunit/HtmlUnitAndJUnitTest.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package com.baeldung.htmlunit;
22

3-
import org.junit.Assert;
4-
import org.junit.Test;
5-
63
import com.gargoylesoftware.htmlunit.WebClient;
74
import com.gargoylesoftware.htmlunit.html.HtmlPage;
5+
import org.junit.After;
6+
import org.junit.Assert;
7+
import org.junit.Before;
8+
import org.junit.Test;
89

910
public class HtmlUnitAndJUnitTest {
1011

12+
private WebClient webClient;
13+
1114
@Before
1215
public void init() throws Exception {
1316
webClient = new WebClient();

0 commit comments

Comments
 (0)