Fehlerbehebung

This commit is contained in:
eichehome 2021-05-15 12:02:45 +02:00
parent 59ed34c94a
commit e752709cdb
2 changed files with 9 additions and 4 deletions

View file

@ -46,14 +46,20 @@ public class ServerHandelClientsThread extends Thread {
Message message = empfangen;
out.writeObject(message);
out.flush();
System.out.println("Nachricht gesendet");
}
} catch (ClassNotFoundException ex) {
System.err.println(ex);
} catch (InterruptedException ex) {
System.err.println("test gegkückt");
System.err.println(ex);
Message message = pipe.read();
out.writeObject();
Message message = pipe.getNextElement();
try {
out.writeObject(message);
System.out.println("Nachricht gesendet");
} catch (IOException ex) {
System.err.println("Fehler: " + ex);
}
Thread.currentThread().interrupt();
} catch (SocketException ex) {
System.err.println("Socket geschlossen");

View file

@ -43,8 +43,7 @@ public class ArrayHelper<T> {
if (array != null) {
int index = getIndex(element, array);
T result = array[index];
T[] temp;
temp = new T[array.length - 2];
T[] temp = new T[array.length - 2];
for (int i = 0; i < index; i++) {
temp[i] = array[i];
}