Skip to content

Fix reactive streams MongoClient.getTimeout always returning null#2009

Open
stIncMale wants to merge 1 commit into
mongodb:mainfrom
stIncMale:JAVA-6246
Open

Fix reactive streams MongoClient.getTimeout always returning null#2009
stIncMale wants to merge 1 commit into
mongodb:mainfrom
stIncMale:JAVA-6246

Conversation

@stIncMale

@stIncMale stIncMale commented Jul 3, 2026

Copy link
Copy Markdown
Member

AI was used only to review.

JAVA-6246

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes the Reactive Streams driver’s MongoClient.getTimeout(TimeUnit) implementation so it reports the configured operation timeout (instead of always returning null), and aligns nullability annotations with the public API contract.

Changes:

  • Reactive Streams: MongoClientImpl.getTimeout now delegates to the underlying cluster implementation.
  • Reactive Streams + Sync: add @Nullable to getTimeout overrides to match the MongoCluster API contract.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
driver-sync/src/main/com/mongodb/client/internal/MongoClientImpl.java Adds @Nullable to getTimeout override to match MongoCluster#getTimeout contract.
driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/MongoClusterImpl.java Adds @Nullable to getTimeout override (note: conversion logic in this method needs correction per review comment).
driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/MongoClientImpl.java Fixes Reactive Streams MongoClient.getTimeout to delegate instead of always returning null; marks return as @Nullable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

@stIncMale stIncMale marked this pull request as ready for review July 4, 2026 00:10
@stIncMale stIncMale requested a review from a team as a code owner July 4, 2026 00:10
@stIncMale stIncMale requested review from rozza and vbabanin and removed request for vbabanin July 4, 2026 00:10
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