Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: documentation typos.
  • Loading branch information
guillaumeblaquiere committed Oct 12, 2020
commit b528d57ad13e313841cee1b61c89397877a2f1e7
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ public UrlEncodedContent(Object data) {
}

/**
* Initialize the UrlEncodedContent with our without the legacy and deprecated escapeUri encoder
* Initialize the UrlEncodedContent with or without the legacy and deprecated escapeUri encoder
* @param data key name/value data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the key is a name and a value? That's surprising.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste of the legacy comment (see line 56 of the file.) I kept the legacy signature and behavior, and I added mine with additional parameter. This one is unchanged (and I guess its description also!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want me to improve both or if keeping the existing description is ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I look at this the weirder it is. Why is this an object instead of a Map?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree; it's strange and I don't know why to use an Object instead of a Map! However to ensure the compatibility with other app that depends on this library, I kept the existing signature.

* @param useUriPathEncoding Escapes the string value so it can be safely included in URI path segments.
* @param useUriPathEncoding escapes the string value so it can be safely included in URI path segments.
* For details on escaping URIs, see <a href="http://tools.ietf.org/html/rfc3986#section-2.4">RFC 3986 -
* section 2.4</a>
*/
public UrlEncodedContent(Object data, Boolean useUriPathEncoding) {
public UrlEncodedContent(Object data, boolean useUriPathEncoding) {
super(UrlEncodedParser.MEDIA_TYPE);
setData(data);
this.uriPathEncodingFlag = useUriPathEncoding;
Expand Down