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; Message message = empfangen;
out.writeObject(message); out.writeObject(message);
out.flush(); out.flush();
System.out.println("Nachricht gesendet");
} }
} catch (ClassNotFoundException ex) { } catch (ClassNotFoundException ex) {
System.err.println(ex); System.err.println(ex);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
System.err.println("test gegkückt"); System.err.println("test gegkückt");
System.err.println(ex); System.err.println(ex);
Message message = pipe.read(); Message message = pipe.getNextElement();
out.writeObject(); try {
out.writeObject(message);
System.out.println("Nachricht gesendet");
} catch (IOException ex) {
System.err.println("Fehler: " + ex);
}
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} catch (SocketException ex) { } catch (SocketException ex) {
System.err.println("Socket geschlossen"); System.err.println("Socket geschlossen");

View file

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