Skip to content

Document missing parameters in HTTPUtilities Javadoc - #926

Open
VolodymyrLinuxovich wants to merge 1 commit into
ESAPI:developfrom
VolodymyrLinuxovich:issue-783
Open

VolodymyrLinuxovich wants to merge 1 commit into
ESAPI:developfrom
VolodymyrLinuxovich:issue-783

Conversation

@VolodymyrLinuxovich

Copy link
Copy Markdown

Closes #783

This fills in the missing Javadoc in the HTTPUtilities interface. Most methods now have every @PARAM, @return and @throws documented. Only comments changed. I checked each description against DefaultHTTPUtilities.

Some of the old text did not match the code. A few overloads named the wrong object. addCookie(Cookie) and addHeader said the current request, but they use the response. getCookie(name) said the current response, but it reads the request. sendRedirect had the sendForward text copied word for word. It now says the location is checked with isValidRedirectLocation. addCookie, addHeader and setHeader log a warning and skip invalid input. They do not throw, so the docs now say that.

I also fixed a broken link to getSessionAttribute and a dead RFC link. The getFileUploads table had ".pn" where it should say ".png". There were a few typos too.

The pom sets doclint to none, so mvn javadoc:javadoc shows no warnings either way. Running javadoc with -Xdoclint:all on this file gave 97 warnings and 12 errors before. Now it gives 8 warnings and no errors. The 8 are on the interface constants, which I left alone.

One thing I did not change. The five argument setRememberToken in DefaultHTTPUtilities returns an empty string on success, not the token. The Javadoc now says what it does. I can fix the code in a separate PR if you want.

Adds the missing @PARAM, @return and @throws tags and describes them
from the reference implementation. Fixes the overloads that named the
wrong current request or response, the sendRedirect doc that was copied
from sendForward, the broken getSessionAttribute link, the self-closing
<p/> tags and a few typos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPUtilities needs its Javadoc seriously reworked

1 participant