spring-projects/spring-data-mongodb — pull request #154 by juhgiyo (2014-03-20 06:39:58+00:00)
Title: DATAMONGO-884 - Avoid NPE for lazy-loaded DBRefs

It seems when intercept function is called the parameter "Object obj" is always "null" (in my case), which results NPE when Object method is called.

If the parameter Object obj is actually always null, it either should remove all the checks and just always invoke by "method.invoke(ensureResolved(), args);"

If there is case that parameter Object obj is NOT null, then it should add another check to handle the case, which the parameter Object obj is null.

See my last comment in jira: https://jira.spring.io/browse/DATAMONGO-884?focusedCommentId=100657&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-100657