meghrathod / chatX

System.exit() should only be invoked within application entry points JAVA-W0060
Bug risk
Major
4 occurrences in this check
System.exit should only be used in entrypoint methods
201            ta.append(username + " Signing Off");
202            oos.writeObject(new userMessage(username, username + "has left the chat", Instant.now()));
203            Thread.sleep(1000);
204            System.exit(0);205        } catch (IOException | InterruptedException e) {
206            e.printStackTrace();
207        }
System.exit should only be used in entrypoint methods
134                    System.out.println("Window Closed");
135
136                    Thread.sleep(1000);
137                    System.exit(0);138                } catch (InterruptedException e1) {
139                    e1.printStackTrace();
140                }
System.exit should only be used in entrypoint methods
 82            ta.append(username + " Signing Off");
 83            oos.writeObject(new userMessage(username, username + "has left the chat", Instant.now()));
 84            Thread.sleep(1000);
 85            System.exit(0); 86        } catch (IOException | InterruptedException e) {
 87            e.printStackTrace();
 88        }
System.exit should only be used in entrypoint methods
 55                    System.out.println("Window Closed");
 56
 57                    Thread.sleep(1000);
 58                    System.exit(0); 59                } catch (InterruptedException e1) {
 60                    e1.printStackTrace();
 61                }