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

use our own boxing and unboxing logic instead of poet's #1967

Merged
merged 4 commits into from
Feb 16, 2023

Conversation

lsingh123
Copy link
Contributor

poet's boxing logic is incompatible with annotated primitives, resulting in breaks like this one, which is repro'd in the first commit on this branch. use our own boxing logic to avoid this error


public static TypeName unbox(TypeName type) {
List<AnnotationSpec> annotations = type.annotations;
return type.withoutAnnotations().unbox().annotated(annotations);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is fine because poet checks equality by object for boxed primitives but by reference for primitives

@palantir palantir deleted a comment from lsingh123 Feb 16, 2023
@palantir palantir deleted a comment from lsingh123 Feb 16, 2023
Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together so quickly!

@bulldozer-bot bulldozer-bot bot merged commit 6bd4079 into develop Feb 16, 2023
@bulldozer-bot bulldozer-bot bot deleted the lsingh/fix-boxed-primitives-bug branch February 16, 2023 16:36
@svc-autorelease
Copy link
Collaborator

Released 6.71.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants