Browse Source

Fix for build, which was failing on MvcEvent being null in one of the tests.

pull/1/head
Jon Brisbin 15 years ago committed by J. Brisbin
parent
commit
8e9cf3a9b1
  1. 8
      spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/MongoTemplate.java

8
spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/MongoTemplate.java

@ -1205,7 +1205,13 @@ public class MongoTemplate implements InitializingBean, MongoOperations, Applica @@ -1205,7 +1205,13 @@ public class MongoTemplate implements InitializingBean, MongoOperations, Applica
public T doWith(DBObject object) {
maybeEmitEvent(new AfterLoadEvent<DBObject>(object));
T source = reader.read(type, object);
maybeEmitEvent(new AfterConvertEvent<T>(object, source));
if (null != source) {
maybeEmitEvent(new AfterConvertEvent<T>(object, source));
} else {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Source object was <NULL>, so couldn't fire AfterConvertEvent<" + type.getName() + ">");
}
}
return source;
}
}

Loading…
Cancel
Save