[COMPASS-2898] Misc Idiomatic Java Syntax Created: 29/May/18  Updated: 30/May/18  Resolved: 30/May/18

Status: Closed
Project: Compass
Component/s: Export to Language
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Anna Herlihy (Inactive) Assignee: Anna Herlihy (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: COMPASS-2309
Story Points: 3
Sprint: Sprint Wyclef Jean

 Description   
  • Use BsonUndefined instead of null
  • java.lang is always imported, so don't need to use the full name.
  • Use SimpleDateFormat instead of toString()
  • Use toHexString instead of toString for ObjectId
  • Use BINARY instead of OLD_BINARY for Binary subtype.
  • Use Document constructor, so generate "{x: 1}" as "new Document("x", 1)" and not "new Document().append("x", 1)"
  • Remove Code.toString() for JS and Shell because the result is just "[object Object]"

https://github.com/mongodb-js/bson-compilers/pull/82 

https://github.com/mongodb-js/bson-compilers/pull/84

Comments from: https://github.com/mongodb-js/bson-compilers/pull/76

 


Generated at Wed Feb 07 22:31:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.