[JAVA-2484] NPE in PojoCodecProvider Created: 05/Apr/17  Updated: 24/Jul/17  Resolved: 06/Apr/17

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: None
Fix Version/s: 3.5.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Ross Lawley
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: POJO

 Description   

The check for packages.contains(clazz.getPackage().getName()))) can cause an NPE when the clazz is a primitive, e.g. byte[], because those classes have null packages.



 Comments   
Comment by Githook User [ 06/Apr/17 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Fixed NPE in package lookup for primitives

JAVA-2484
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/cc7992d3d2583e4e5a8f44dcb222bded2629fca5

Comment by Ross Lawley [ 05/Apr/17 ]

Good catch - I'm looking forward to Java 2.0 that fixes all these edgecases

PR: https://github.com/rozza/mongo-java-driver/pull/179

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