gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From renato2099 <...@git.apache.org>
Subject [GitHub] gora pull request: GORA-429 Implement Maven forbidden-apis plugin ...
Date Tue, 01 Sep 2015 11:02:23 GMT
Github user renato2099 commented on the pull request:

    https://github.com/apache/gora/pull/32#issuecomment-136675372
  
    Hi @lewismc 
    I think the logic is fine, the non-null checks you are describing are for checking nullable
schemas, and that is what you've described. Yes, it is recursive if there are nested objects,
but the exception is for when "something" goes wrong with serialization (for example, class
changes can easily make your serialized data unreadable if you were using reflection) that
is why Java forces us to throw an IOException and not NullPointerException. And caching this
exception makes us "retry" serialization calling again to <return toBytes(o)> on the
object. If we don't print the IO exception, we would probably get an stackOverFlowException
because of the recursion and catching this error would be a lot harder.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message