Skip to content

Commit

Permalink
QuicEvent implementations should have toString() overrides (java-nati…
Browse files Browse the repository at this point in the history
…ve-access#613)

Motivation:

We should add toString() implementations for our QuicEvent
implementations to make debugging easier.

Modifications:

Add toString() methods

Result:

Easier to log / debug events
  • Loading branch information
normanmaurer authored Nov 14, 2023
1 parent de1d536 commit 1b311c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ public SocketAddress oldAddress() {
public SocketAddress newAddress() {
return newAddress;
}

@Override
public String toString() {
return "QuicConnectionEvent{" +
"oldAddress=" + oldAddress +
", newAddress=" + newAddress +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ public final class QuicDatagramExtensionEvent implements QuicExtensionEvent {
public int maxLength() {
return maxLength;
}

@Override
public String toString() {
return "QuicDatagramExtensionEvent{" +
"maxLength=" + maxLength +
'}';
}
}

0 comments on commit 1b311c4

Please sign in to comment.