Fehlerbehebung
This commit is contained in:
parent
59ed34c94a
commit
e752709cdb
2 changed files with 9 additions and 4 deletions
|
@ -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");
|
||||||
|
|
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue