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

Annotate some java.net classes, mostly related to cookies. #108

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Conversation

cpovirk
Copy link
Collaborator

@cpovirk cpovirk commented Nov 12, 2024

Prompted by
google/xplat@18fd514.

@martinkretzschmar
Copy link

I have a new change for xplat/j2kt's HttpCookie

@cpovirk
Copy link
Collaborator Author

cpovirk commented Nov 19, 2024

Thanks! I see that the Harmony tests you're using do explicitly check for handling of null cookie values, the case that I'm unsure about. I gather that the JDK lets them through, but it would be nice if it were explicit about that—or at least had some tests for it, but I haven't found any, nor have I found easily identifiable calls to new HttpCookie(name, null) in our codebase.

@martinkretzschmar
Copy link

Yes, the annotations were driven by that test. It passes when running with regular OpenJDK. But good question. Why should null be allowed as the cookie value.

Copy link
Collaborator

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

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

The javadoc doesn't make nullness clear in many places. What I checked looked consistent with the implementation.

@wmdietl wmdietl assigned cpovirk and unassigned wmdietl Dec 18, 2024
@cpovirk cpovirk merged commit e717491 into main Dec 18, 2024
19 checks passed
@cpovirk cpovirk deleted the cookies branch December 18, 2024 14:40
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.

3 participants