[JAVA-1901] DBCollection.setObjectClass(null) throws NullPointerException Created: 22/Jul/15  Updated: 01/Apr/16  Resolved: 26/Aug/15

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: 3.0.3
Fix Version/s: 3.0.4

Type: Bug Priority: Major - P3
Reporter: Eric Sommer Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: cs, regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

Calling setObjectClass() with value null causes NullPointerException to be thrown.

java.lang.NullPointerException
	at java.lang.Class.isAssignableFrom(Native Method)
	at com.mongodb.DBCollectionObjectFactory.isReflectionDBObject(DBCollectionObjectFactory.java:86)
	at com.mongodb.DBCollectionObjectFactory.update(DBCollectionObjectFactory.java:61)
	at com.mongodb.DBCollection.setObjectClass(DBCollection.java:1888)



 Comments   
Comment by Jeffrey Yemin [ 14/Sep/15 ]

Fix release today in 3.0.4.

Comment by Githook User [ 26/Aug/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: To fix a regression from 2.x, DBCollection now handles a null Class argument to setObjectClass and setInternalClass

JAVA-1901
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/9d12901b38a90b154b07da0878d5caafeeb58412

Comment by Githook User [ 26/Aug/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: To fix a regression from 2.x, DBCollection now handles a null Class argument to setObjectClass and setInternalClass

JAVA-1901
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f7a55b9a76c0ab62b48c90747d1791f950762bcc

Generated at Thu Feb 08 08:55:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.