Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-2898

Misc Idiomatic Java Syntax

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Export to Language
    • None

    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

       

      Attachments

        Activity

          People

            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: