Remove nulls

This commit is contained in:
Alex Theedom 2016-08-25 22:07:52 +01:00
parent 0e1d0b4092
commit 393106be61
6 changed files with 18 additions and 18 deletions

View File

@ -4,9 +4,9 @@ import java.io.*;
import java.net.*;
public class EchoClient {
private Socket clientSocket = null;
private PrintWriter out = null;
private BufferedReader in = null;
private Socket clientSocket;
private PrintWriter out;
private BufferedReader in;
public void startConnection(String ip, int port) {
try {

View File

@ -4,7 +4,7 @@ import java.net.*;
import java.io.*;
public class EchoMultiServer {
private ServerSocket serverSocket = null;
private ServerSocket serverSocket;
public void start(int port) {
try {
@ -32,8 +32,8 @@ public class EchoMultiServer {
private static class EchoClientHandler extends Thread {
private Socket clientSocket;
private PrintWriter out = null;
private BufferedReader in = null;
private PrintWriter out;
private BufferedReader in;
public EchoClientHandler(Socket socket) {
this.clientSocket = socket;

View File

@ -4,10 +4,10 @@ import java.net.*;
import java.io.*;
public class EchoServer {
private ServerSocket serverSocket = null;
private Socket clientSocket = null;
private PrintWriter out = null;
private BufferedReader in = null;
private ServerSocket serverSocket;
private Socket clientSocket;
private PrintWriter out;
private BufferedReader in;
public void start(int port) {
try {

View File

@ -7,9 +7,9 @@ import java.io.PrintWriter;
import java.net.Socket;
public class GreetClient {
private Socket clientSocket = null;
private PrintWriter out = null;
private BufferedReader in = null;
private Socket clientSocket;
private PrintWriter out;
private BufferedReader in;
public void startConnection(String ip, int port) {
try {

View File

@ -4,10 +4,10 @@ import java.net.*;
import java.io.*;
public class GreetServer {
private ServerSocket serverSocket = null;
private Socket clientSocket = null;
private PrintWriter out = null;
private BufferedReader in = null;
private ServerSocket serverSocket;
private Socket clientSocket;
private PrintWriter out;
private BufferedReader in;
public void start(int port) {

View File

@ -2,8 +2,8 @@ package com.baeldung.socket;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import java.util.concurrent.Executors;
import static org.junit.Assert.assertEquals;