Skip to content

Commit

Permalink
Revert RESTMessage.toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Jun 16, 2023
1 parent d314aae commit 5d04775
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,15 @@ public static RESTMessage fromXML(String xml) throws Exception {
return fromDOM(element);
}

/**
* Returns a string representation of the object.
*
* Do not serialize the REST message by default to avoid exposing
* sensitive info. Subclasses can override this method if it's safe.
*/
@Override
public String toString() {
try {
return toJSON();
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
// don't change this
return super.toString();
}
}

0 comments on commit 5d04775

Please sign in to comment.