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

TCK wrongly test GregorianCalendar #177

Closed
rmannibucau opened this issue Aug 13, 2019 · 7 comments
Closed

TCK wrongly test GregorianCalendar #177

rmannibucau opened this issue Aug 13, 2019 · 7 comments

Comments

@rmannibucau
Copy link

Hi,

Not sure where TCK are but I'd like to report that they likely assume they run on a particular implementation - which is wrong from a spec perspective.

com.sun.ts.tests.jsonb.defaultmapping.dates.DatesMappingTest#testGregorianCalendarWithTimeMapping uses GregorianCalendar#equals to compare serialized and deserialized instances which basically means the way the instance is built - and not its value - is validated. This is likely wrong since JSON-B can only guarantee the value.

@jansupol
Copy link

  1. The TCK repo is here
  2. The test is here
  3. Do you refer to b.equals(orig.getTime()) or what equals?

@rmannibucau
Copy link
Author

@jansupol yes, the default equals is used for the mentionned test, i.e. com.sun.ts.tests.jsonb.MappingTester#testUnmarshall which just do an equals (no getTime() or so).

@jansupol
Copy link

Can you please point to the line in MappingTester?

@jansupol
Copy link

This seems to be the only case using GregorianCalendar. Do the other tests work for you? Can you please file a bug in the TCK issue tracker?

@rmannibucau
Copy link
Author

Done at jakartaee/platform-tck#102, thanks for the help @jansupol

@jansupol
Copy link

Closing this in favor of the new bug

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

No branches or pull requests

2 participants