repositories
/
TD_SR.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TD2: Ensure chat clients will not send empty message.
[TD_SR.git]
/
TD2
/
IHM
/
IHM.java
diff --git
a/TD2/IHM/IHM.java
b/TD2/IHM/IHM.java
index a10c23dc1ae764d0f0dc981a12773c3f0d77c900..22624fcc9a8749b12819655f7a33dbf260094993 100644
(file)
--- a/
TD2/IHM/IHM.java
+++ b/
TD2/IHM/IHM.java
@@
-94,6
+94,8
@@
public class IHM implements ActionListener {
e.printStackTrace();
}
String mess = (String)sendMessages.remove(0);
e.printStackTrace();
}
String mess = (String)sendMessages.remove(0);
+ if (mess.length() == 0)
+ return "";
System.out.println("IHM -> message a envoyer : " + mess);
return randName + "> " + mess;
}
System.out.println("IHM -> message a envoyer : " + mess);
return randName + "> " + mess;
}