Skip to content

Commit ed1fadb

Browse files
authored
Clean up internal packages (#1026)
* Ensure that every public type has Javadoc indicating it's not part of the public API * Remove boilerplate Javadoc * Remove some unused methods
1 parent a999e15 commit ed1fadb

File tree

230 files changed

+426
-3321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+426
-3321
lines changed

bson/src/main/org/bson/internal/ProvidersCodecRegistry.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
import static org.bson.assertions.Assertions.isTrueArgument;
3232
import static org.bson.assertions.Assertions.notNull;
3333

34+
/**
35+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
36+
*/
3437
public final class ProvidersCodecRegistry implements CycleDetectingCodecRegistry {
3538
private final List<CodecProvider> codecProviders;
3639
private final CodecCache codecCache = new CodecCache();

bson/src/main/org/bson/internal/UuidHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
/**
2828
* Utilities for encoding and decoding UUID into binary.
29+
*
30+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2931
*/
3032
public final class UuidHelper {
3133
private static void writeLongToArrayBigEndian(final byte[] bytes, final int offset, final long x) {

driver-core/src/main/com/mongodb/internal/CheckedSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.mongodb.internal;
1818

1919
/**
20-
* This class is not part of the public API and may be removed or changed at any time.
20+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2121
*/
2222
@FunctionalInterface
2323
public interface CheckedSupplier<T, E extends Exception> {

driver-core/src/main/com/mongodb/internal/HexUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.security.NoSuchAlgorithmException;
2222

2323
/**
24-
* This class is not part of the public API and may be removed or changed at any time.
24+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2525
*/
2626
public final class HexUtils {
2727
/**

driver-core/src/main/com/mongodb/internal/IgnorableRequestContext.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
/**
2525
* A {@link RequestContext} that can be ignored by the driver. Useful to ensure that we always
2626
* have a non-null {@link RequestContext} to pass around the driver.
27+
*
28+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2729
*/
2830
public final class IgnorableRequestContext implements RequestContext {
2931

driver-core/src/main/com/mongodb/internal/Iterables.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
import static java.util.Arrays.asList;
2828
import static java.util.Collections.singleton;
2929

30+
/**
31+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
32+
*/
3033
public final class Iterables {
3134
@SafeVarargs
3235
@SuppressWarnings("varargs")

driver-core/src/main/com/mongodb/internal/Locks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.function.Supplier;
2323

2424
/**
25-
* This class is not part of the public API and may be removed or changed at any time.
25+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2626
*/
2727
public final class Locks {
2828
public static void withLock(final Lock lock, final Runnable action) {

driver-core/src/main/com/mongodb/internal/Timeout.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
/**
3131
* A <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/doc-files/ValueBased.html">value-based</a> class
3232
* useful for tracking timeouts.
33+
*
34+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
3335
*/
3436
@Immutable
3537
public final class Timeout {

driver-core/src/main/com/mongodb/internal/VisibleForTesting.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* Denotes that the annotated program element is made more accessible than otherwise necessary for the purpose of testing.
2626
* The annotated program element must be used as if it had the {@linkplain #otherwise() intended} access modifier
2727
* for any purpose other than testing.
28+
*
29+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2830
*/
2931
@Documented
3032
@Retention(RetentionPolicy.SOURCE)

driver-core/src/main/com/mongodb/internal/async/AsyncAggregateResponseBatchCursor.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,14 @@
2222
/**
2323
* Extends the async batch cursor interface to include information included in an aggregate or getMore response.
2424
*
25-
* @param <T> The type of documents the cursor contains
26-
* @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#wire-op-get-more OP_GET_MORE
25+
* <p>This class is not part of the public API and may be removed or changed at any time</p>
2726
*/
2827
public interface AsyncAggregateResponseBatchCursor<T> extends AsyncBatchCursor<T> {
29-
/**
30-
* Returns the postBatchResumeToken.
31-
*
32-
* @return the postBatchResumeToken
33-
*/
3428
BsonDocument getPostBatchResumeToken();
3529

36-
/**
37-
* Returns the operation time found in the aggregate or getMore response.
38-
*
39-
* @return the operation time
40-
*/
4130
BsonTimestamp getOperationTime();
4231

43-
/**
44-
* Returns true if the first batch was empty.
45-
*
46-
* @return true if the first batch was empty
47-
*/
4832
boolean isFirstBatchEmpty();
4933

50-
/**
51-
* Returns the max wire version.
52-
*
53-
* @return the max wire version
54-
*/
5534
int getMaxWireVersion();
5635
}

0 commit comments

Comments
 (0)