Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
e.printStackTrace();
}
String mess = (String)sendMessages.remove(0);
- if (mess.length() == 0)
+ if (mess.isEmpty())
return "";
System.out.println("IHM -> message a envoyer : " + mess);
return randName + "> " + mess;
if (line.equals(".")) {
end = true;
}
- if (line.length() != 0) {
+ if (!line.isEmpty()) {
client.sendMsg(line);
System.out.println(Thread.currentThread().getName() + " a envoye " + line);
}
if (line.equals(".")) {
end = true;
}
- if (line.length() != 0) {
+ if (!line.isEmpty()) {
client.sendMsg(line);
System.out.println(Thread.currentThread().getName() + " a envoye " + line);
}
if (line.equals(".")) {
end = true;
}
- if (line.length() != 0) {
+ if (!line.isEmpty()) {
Message oMsg = new Message(randName, line, Calendar.getInstance());
client.sendoMsg(oMsg);
System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg);