Skip to content

Commit 572065a

Browse files
committed
tweaks
1 parent 7d58b4c commit 572065a

File tree

2 files changed

+14
-26
lines changed

2 files changed

+14
-26
lines changed

source/upgrade.txt

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,18 @@ the version after v4.0 including any listed under v4.5.
6161
Version 5.0 Breaking Changes
6262
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6363

64-
- This driver version introduces the following changes to the ``ConnectionId`` class:
64+
This driver version introduces the following breaking changes:
65+
66+
- Changes to the ``ConnectionId`` class:
6567

6668
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
6769
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
6870
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
6971
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
7072

71-
- Changes the data type of the timeout duration parameter in the
72-
``SocketSettings.Builder.connectTimeout()`` and
73-
``SocketSettings.Builder.readTimeout()`` methods. The data type of this
74-
parameter is now ``long`` instead of ``int``. To view an example that shows
75-
how to call ``SocketSettings`` methods, see the :ref:`SocketSettings Example
76-
<java-socketsettings-example>` in the Specify MongoClient Settings guide. This
77-
change breaks binary compatibility (requires recompiling) but does not require
78-
code changes.
73+
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
74+
type ``int``. This change breaks binary compatibility, so you must recompile any code
75+
that calls the ``withServerValue()`` method.
7976

8077
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
8178
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
@@ -116,15 +113,13 @@ Version 5.0 Breaking Changes
116113

117114
.. _java-breaking-changes-v5.0-observables:
118115

119-
- This driver version removes the
120-
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
121-
class. This means the ``org.reactivestreams.Publisher[Void]`` type no longer
122-
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
123-
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
116+
- Removes the ``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid``
117+
implicit class. This means the ``org.reactivestreams.Publisher[Void]`` type no
118+
longer converts automatically to ``org.mongodb.scala.SingleObservable[Void]``.
119+
The API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
124120
``org.mongodb.scala.Observable[Void]``.
125121

126122
.. After the 5.0 Scala API docs are released, this line will be uncommented.
127-
128123
For more information, see the `Observable trait documentation <https://mongodb.github.io/mongo-java-driver/5.0/apidocs/mongo-scala-driver/org/mongodb/scala/Observable.html>`__.
129124

130125
- Changes how ``ClusterSettings`` computes
@@ -246,14 +241,6 @@ Version 5.0 Breaking Changes
246241
constructor that includes an ``errorLabels`` parameter. Instead, you can use
247242
the error labels included in the top-level response document.
248243

249-
- Removes the
250-
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
251-
class from the Scala driver package. This means the
252-
``org.reactivestreams.Publisher[Void]`` type no longer
253-
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
254-
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
255-
``org.mongodb.scala.Observable[Void]``.
256-
257244
- Introduces the following changes to the ``ConnectionId`` class:
258245

259246
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second

source/whats-new.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,10 @@ What's New in 4.8
285285

286286
.. important:: Deprecation Notice
287287

288-
The ``IterableCodec`` and ``MapCodec`` classes are deprecated.
289-
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
290-
instead of ``IterableCodec``.
288+
The ``MapCodec`` and ``IterableCodec`` classes are deprecated.
289+
Instead of ``MapCodec``, use ``MapCodecProvider``. Instead of ``IterableCodec``,
290+
use ``CollectionCodecProvider``, or ``IterableCodecProvider`` for ``Iterable``
291+
types that aren't ``Collection`` types.
291292

292293
Behavioral changes with the 4.8 driver release include:
293294

0 commit comments

Comments
 (0)