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

HV-1392 Annotation Processor should check that constraint payload does not contains both Unwrap and Skip at the same time #774

Closed
wants to merge 1 commit into from

Conversation

marko-bekhta
Copy link
Member

Even though it's not a CR1 item I just thought that we should have something for AP added as well, cannot just leave it as is :)

@marko-bekhta
Copy link
Member Author

Also another thing related to AP.... I was looking through Jira issues and I saw this example:

private class BeanWithWrapperWithTwoTypeArguments {
	@Min(value = 10, payload = { Unwrapping.Unwrap.class })
	private final WrapperWithTwoTypeArguments<Long, String> wrapper = new WrapperWithTwoTypeArguments<>( 5L, "value" );
}

AP will fail in such cases as @Min is not allowed for such type... So I think type check in AP should be improved a bit.

@gsmet
Copy link
Member

gsmet commented Jun 26, 2017

@marko-bekhta yeah, I don't think we will be able to make this work consistently. Typically, what about types with an @UnwrapByDefault value extractor?

Or in your case, how would we know if the Long or the String is the type we target...

Pinging @gunnarmorling so he's aware of this limitation.

@gsmet
Copy link
Member

gsmet commented Jun 26, 2017

Merged, thanks!

@gsmet gsmet closed this Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants