johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Inconsistent Mapping Behavior...
Date Tue, 01 Jan 2019 15:31:10 GMT
I am looking at JOHNZON-177 and I have noticed that we seem to be mapping
primitives inconsistently inside the same class.
MappingParserImpl.toObject() and MappingParserImpl.readObject() both
contain special logic for handling longs and ints.  Why wouldn't we want to
handle these types consistently regardless of where they're used (fields or
the root type)?

I have included code to handle the overflow/underflow case with a nice
error message and that works fine when I added tests to the
DefaultMappingTest from the JSON-B module.  However, I found that
MapperTest seems to already have similar tests for invalid long/int
values.  As I trace the logic, it doesn't hit my new code.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message