rishabhdaim commented on code in PR #295: URL: https://github.com/apache/jackrabbit-oak/pull/295#discussion_r963576536
########## oak-run/src/main/java/org/apache/jackrabbit/oak/run/DataStoreCheckCommand.java: ########## @@ -188,9 +188,9 @@ static int checkDataStore(String... args) { NodeStore nodeStore = null; if (options.has(store)) { String source = options.valueOf(store); - if (source.startsWith(MongoURI.MONGODB_PREFIX)) { - MongoClientURI uri = new MongoClientURI(source); - MongoClient client = new MongoClient(uri); + if (source.startsWith(MongoConnection.MONGODB_PREFIX)) { Review Comment: Implementation of `options.valueOf(store)` clearly states that it can return an null value if it returns an `emptyList()`. I think we should handle the null check here as well. ```suggestion if (StringUtils.startsWith(source, MongoConnection.MONGODB_PREFIX)) { ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org