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

Closed
opened 2020-03-21 15:56:44 +01:00 by louis_royer · 1 comment
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 2020-03-21 15:56:44 +01:00
louis_royer added the
duplicate
label 2020-03-21 16:01:11 +01:00
Author
Collaborator

See #57.

See #57.
Sign in to join this conversation.
No description provided.