Faire en sorte que le client ne crash pas lorsqu’il est le seul connecté au tracker #56

Closed
opened 5 years ago by louis_royer · 1 comments
Collaborator
Exception in thread "client P2P-JAVA-PROJECT" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0                                 
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)                                                               
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)                                                     
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)                                                               
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:458)
        at clientP2P.ClientManagementUDP.listDirectory(ClientManagementUDP.java:193)                                                                  
        at clientP2P.ClientManagementUDP.run(ClientManagementUDP.java:76)
        at java.base/java.lang.Thread.run(Thread.java:834)

À la place, on peut demander à l’utilisateur de réessayer de contacter le tracker plus tard (quand il appuyera sur entrée).

``` Exception in thread "client P2P-JAVA-PROJECT" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:458) at clientP2P.ClientManagementUDP.listDirectory(ClientManagementUDP.java:193) at clientP2P.ClientManagementUDP.run(ClientManagementUDP.java:76) at java.base/java.lang.Thread.run(Thread.java:834) ``` À la place, on peut demander à l’utilisateur de réessayer de contacter le tracker plus tard (quand il appuyera sur entrée).
louis_royer added the
bug
easy
labels 5 years ago
louis_royer added the
duplicate
label 5 years ago
Poster
Collaborator

See #57.

See #57.
louis_royer closed this issue 5 years ago
Sign in to join this conversation.
Loading…
There is no content yet.