# | Line 116 | Line 116 | public class Smtp { | |
---|---|---|
116 | public void sendCommand(String cmd, int reply) throws IOException { | |
117 | _socketOut.println(cmd); | |
118 | String temp = _socketIn.readLine(); | |
119 | < | if (!temp.startsWith(new Integer(reply).toString())) { |
119 | > | if (temp == null) { |
120 | > | throw new IOException ("IO error reading from socket, connection to server died?"); |
121 | > | } |
122 | > | if (!temp.startsWith(String.valueOf(reply))) { |
123 | throw new IOException ("Expected " + reply + ", got " + temp); | |
124 | } | |
125 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |