Robin Hillyard
1 min readJan 15, 2020

--

Good post. However, it seems to me that Morphia has overstepped their prerogative. The line `constructor.setAccessible(true);` shouldn’t be there (IMO). Instead the method should catch the thrown exception (IllegalAccess or whatever) and then give the caller the opportunity to handle the exception by providing their own instance.

--

--

Robin Hillyard
Robin Hillyard

Written by Robin Hillyard

I’ve been addicted to programming for over 50 years now. I currently teach two classes to graduates at Northeastern University, Boston, USA.

No responses yet