repositories
/
TD_SR.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
03a13b6
)
TD2: Clearify the empty message detection logic.
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Sat, 17 Mar 2018 21:35:49 +0000
(22:35 +0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Sat, 17 Mar 2018 21:35:49 +0000
(22:35 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TD2/IHM/IHM.java
patch
|
blob
|
blame
|
history
diff --git
a/TD2/IHM/IHM.java
b/TD2/IHM/IHM.java
index 5a43687654e919f5b1a45c29905736824b7d6563..4e43c6d2d1e8feb65c3edc65e351cfc8156d0608 100644
(file)
--- a/
TD2/IHM/IHM.java
+++ b/
TD2/IHM/IHM.java
@@
-94,10
+94,12
@@
public class IHM implements ActionListener {
e.printStackTrace();
}
String mess = (String)sendMessages.remove(0);
- if (mess.isEmpty())
+ if (!mess.isEmpty()) {
+ System.out.println("IHM -> message a envoyer : " + mess);
+ return randName + "> " + mess;
+ } else {
return "";
- System.out.println("IHM -> message a envoyer : " + mess);
- return randName + "> " + mess;
+ }
}
public void writeMessage(String mess) {