Skip to content

test and fix for issue #33: "ghost" type parameter in field #34

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

Merged
merged 1 commit into from
Sep 28, 2016

Conversation

web-online
Copy link

I punted on the "primitive" bit since it seems the ResolvedPrimitiveType wasn't intended for object primitives like Integer.class

@cowtowncoder
Copy link
Member

cowtowncoder commented Sep 28, 2016

Thanks! I'll merge and have a look; sounds safe enough, although I wish I understood why the ghost type is introduced in this case.

Also: correct, Integer is not a primitive type. It's wrapper type, but from classmate perspective that's just a non-interface non-primitive type, and nothing fundamentally special. Although it might not be a bad idea to have some means to check for wrappers as they do have special relationship with actual primitive "buddy" types...

@cowtowncoder cowtowncoder merged commit fecf425 into FasterXML:master Sep 28, 2016
@cowtowncoder cowtowncoder added this to the 1.3.3 milestone Sep 28, 2016
@cowtowncoder
Copy link
Member

Ok, I generalized the fix slightly, since it seemed that same should apply to interface types as well.
And after change, noticed one of unit tests failed; looking deeper realized test had been producing (and happily accepting...) ghost types, so had to fix the test instead.

Now: this will be fine for 1.3.3 (which I'll release shortly), but I have a nagging feeling that this actually points to a more general problem. It is possible that type binding given to leaf types might be incorrect, and so although this fix will remove ghost types for non-generic types, I wonder if there wouldn't be cases of partially resolved types that would exhibit either ghosts or even possible wrong ordering.

Anyway... for now things work so we'll cross the bridge (wrt possible add-on work) when get there.

@web-online
Copy link
Author

Nice, thanks! I wasn't sure how far to take it, but that generalization makes sense to me. I hadn't realized it before you said it, but I had a similar nagging feeling about leaf types. I agree that this is the best solution for now.

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.

None yet

2 participants