Misc Idiomatic Java Syntax

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Export to Language
    • None
    • None

      • 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

       

            Assignee:
            Anna Herlihy (Inactive)
            Reporter:
            Anna Herlihy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: