Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servlet api issue 175 add cookie set attribute v3 #401

Merged

Conversation

gregw
Copy link
Contributor

@gregw gregw commented May 3, 2021

Extends #400 with optimisation to lazily create the attribute map.
Also added hash and equality for completeness

@gregw gregw mentioned this pull request May 3, 2021
Copy link
Contributor

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

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

This LGTM, but what are we going to do for TCK tests for changes? AFAIK there is no real plan for how to handle changes that require TCK updates.

@gregw
Copy link
Contributor Author

gregw commented May 3, 2021

@stuartwdouglas hopefully this should be transparent change to the TCK, so at least we wont break it and thus it doesn't specifically need a TCK change.... but then it is a change to the API so it should be tested in the TCK...

unless we add a unit test in the API project and then add a single new TCK test that runs the unit tests from the project?

@stuartwdouglas
Copy link
Contributor

Yea, its not that this will break existing stuff, but more that we should be testing that containers implement it properly.

Maybe we can just wait until there is more clarity on the TCK development process and add the tests then.

@gregw
Copy link
Contributor Author

gregw commented May 4, 2021

So OK to merge then?
@BalusC as the OP, are you good with this version?
@stuartwdouglas as this contains commits from both @BalusC and myself, then should I not squash before the merge?

@gregw
Copy link
Contributor Author

gregw commented May 4, 2021

Ah, I just saw the comments on #400 regarding junit5. I will add some unit tests for this now....

@gregw
Copy link
Contributor Author

gregw commented May 4, 2021

@stuartwdouglas that was worthwhile! Found a few little issues and corner cases that needed to be resolved. Coverage is now 96%

Copy link
Contributor

@markt-asf markt-asf left a comment

Choose a reason for hiding this comment

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

I like it. A few minor comments/queries.

@pzygielo

This comment has been minimized.

Copy link
Contributor

@markt-asf markt-asf left a comment

Choose a reason for hiding this comment

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

LGTM. This is a good addition to the API.

}

if (MAX_AGE.equalsIgnoreCase(name) && value != null) {
Long.parseLong(value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use Integer to be consistent with setMaxAge(int) ?

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 now just call setMaxAge here, rather than duplicate the checking logic.

@gregw gregw requested review from markt-asf and BalusC May 4, 2021 21:09
@gregw gregw requested a review from BalusC May 5, 2021 21:44
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we move these to a section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

move the versions to properties?

@gregw gregw merged commit c04d563 into jakartaee:master May 17, 2021
@gregw gregw deleted the servlet-api-issue-175_add-cookie-setAttribute-v3 branch May 17, 2021 22:33
http.method_get_not_supported=La m�thode HTTP GET n''est pas support�e par cette URL
http.method_post_not_supported=La m�thode HTTP POST n''est pas support�e par cette URL
http.method_put_not_supported=La m�thode HTTP PUT n''est pas support�e par cette URL
http.method_delete_not_supported=La m�thode HTTP DELETE n''est pas support�e par cette URL
Copy link
Member

Choose a reason for hiding this comment

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

Please correct this and fix your editor to not anymore cause this in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've fixed the file.

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.

6 participants