Skip to content

Commit c2433e2

Browse files
committed
v1.0 closeSyncWindow() on invalid password too
1 parent 4cb85b5 commit c2433e2

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: sharedtable
2-
Version: 0.9
2+
Version: 1.0
33
Maintainer: Gaál Péter
44
Architecture: amd64
55
Description: This is a Microsoft Paint like app, where multiple user can draw on the same canvas at the same time.

SharedTable/src/main/java/com/sharedtable/model/network/ConnectedClientEntity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ private synchronized void handshakingProcess() {
482482
sendNetworkPasswordValidationResultOnSync(false);
483483
logger.info("sending Network Password Validation Result: false");
484484
handleScannerClose();
485+
MessageBox.closeSyncWindow();
485486
return;
486487
} else {
487488
sendNetworkPasswordValidationResultOnSync(true);
@@ -495,6 +496,7 @@ private synchronized void handshakingProcess() {
495496
if(!receiveNetworkPasswordValidationResultOnSync()) {
496497
MessageBox.showError("Érvénytelen jelszó!", "A megadott hálózati jelszó érvénytelen");
497498
handleScannerClose();
499+
MessageBox.closeSyncWindow();
498500
return;
499501
}
500502

SharedTable/src/main/java/com/sharedtable/view/MessageBox.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import java.util.Timer;
1010
import java.util.TimerTask;
11+
import java.util.logging.Logger;
1112

1213
public class MessageBox {
1314
private MessageBox() {
@@ -58,7 +59,7 @@ public static void closeSyncWindow() {
5859
syncProcessView.closeWindow();
5960
});
6061
} else {
61-
throw new RuntimeException("SyncProcessView was not shown!");
62+
Logger.getAnonymousLogger().warning("sync window is null");
6263
}
6364
}
6465

0 commit comments

Comments
 (0)