Skip to content

Commit

Permalink
JerseyInvocation should override toString()
Browse files Browse the repository at this point in the history
Override toString() with a sensible implementation.
So if you log a given JerseyInvocation object at least the request method and
URI of the contained requestContext is printed.

See issue #4270

Signed-off-by: Thomas Meyer <[email protected]>
  • Loading branch information
Thomas Meyer authored and thomasmey committed Apr 25, 2020
1 parent 950ce6c commit 91deb4d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -994,4 +994,9 @@ private WebApplicationException createExceptionForFamily(final Response response
ClientRequest request() {
return requestContext;
}

@Override
public String toString() {
return "JerseyInvocation [" + request().getMethod() + ' ' + request().getUri() + "]";
}
}

0 comments on commit 91deb4d

Please sign in to comment.