Maybe you have declared Document in the class
You have an erroneous import up there for swing document. getCollection clearly returns bson document tho. obviously this means that your import is wrong. swing document is not required. you wrote that you wanted to use swing document so Intellij said well you 'the coder' required this to be swing document but you gave me bson document. this should be clear after one look at the code, especially because Intellij often gets imports wrong like this if you just carelessly press alt enter without reading what it actually says.
Обсуждают сегодня