Skip to content

Conversation

@huey-tlatoani
Copy link

No description provided.

Copy link
Contributor

@IlyaEp IlyaEp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! I’ll have another look after we address or discuss the current issues

for (String browser : browsers) {
try {
// Check if browser exists
Process process = runtime.exec(new String[] {"which", browser});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use desktop actions?

* jdbc:mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
* The URL excepting the jdbc: prefix is passed as it is to the MongoDb native Java driver.
*/
public class MongoJdbcDriver implements Driver {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are hard to read because the diff includes unnecessary style edits (formatting, etc.). Please remove them or split the commits so that only the actual logic changes are visible

*/
public String getDriverVersion() {
return "1.20";
return "1.30";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not update driver version

shadowJar {
archiveFileName = "mongo-jdbc-standalone-${version}.jar"
mergeServiceFiles()
relocate 'com.nimbusds', 'shadow.com.nimbusds'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe the purpose of this change

ShellHolder shellHolder = this.shellHolder;
this.shellHolder = createShellHolder();

var existingResult = Optional.ofNullable(this.mongoConnection)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use "var"

public void start() throws IOException {
server = HttpServer.create(new InetSocketAddress(DEFAULT_REDIRECT_PORT), 0);

server.createContext("/callback", new CallbackHandler());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You created a constant for '/accepted', but not for '/callback'. Why?


import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we at least use Netty?

}

public OidcResponse getOidcResponse() throws InterruptedException, OidcTimeoutException {
return getOidcResponse(Duration.ofSeconds(300));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number

private @Nullable ExecutorService executorService;
private @Nullable Engine sharedEngine;
private @NotNull ShellHolder shellHolder;
private MongoConnection mongoConnection;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not cache the DB connection. If you need to cache the token, cache that instead

return null;
}

Server server = new Server();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to bind the server lifecycle to the driver and initialize it lazily?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants