Skip to content

Commit 6530e3c

Browse files
committed
Ensure the abstract CommandEvent also has the same order of params
JAVA-4875
1 parent 8614945 commit 6530e3c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

driver-core/src/main/com/mongodb/event/CommandEvent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public abstract class CommandEvent {
4242
* @param operationId the operation id
4343
* @param requestId the request id
4444
* @param connectionDescription the connection description
45-
* @param commandName the command name
4645
* @param databaseName the database name
46+
* @param commandName the command name
4747
* @since 4.11
4848
*/
4949
public CommandEvent(@Nullable final RequestContext requestContext, final long operationId, final int requestId,
50-
final ConnectionDescription connectionDescription, final String commandName, final String databaseName) {
50+
final ConnectionDescription connectionDescription, final String databaseName, final String commandName) {
5151
this.requestContext = requestContext;
5252
this.requestId = requestId;
5353
this.connectionDescription = connectionDescription;
@@ -70,7 +70,7 @@ public CommandEvent(@Nullable final RequestContext requestContext, final long op
7070
@Deprecated
7171
public CommandEvent(@Nullable final RequestContext requestContext, final long operationId, final int requestId,
7272
final ConnectionDescription connectionDescription, final String commandName) {
73-
this(requestContext, -1, requestId, connectionDescription, commandName, "");
73+
this(requestContext, -1, requestId, connectionDescription, "", commandName);
7474
}
7575

7676
/**
@@ -85,7 +85,7 @@ public CommandEvent(@Nullable final RequestContext requestContext, final long op
8585
@Deprecated
8686
public CommandEvent(@Nullable final RequestContext requestContext, final int requestId,
8787
final ConnectionDescription connectionDescription, final String commandName) {
88-
this(requestContext, -1, requestId, connectionDescription, commandName, "");
88+
this(requestContext, -1, requestId, connectionDescription, "", commandName);
8989
}
9090

9191
/**

driver-core/src/main/com/mongodb/event/CommandFailedEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class CommandFailedEvent extends CommandEvent {
5050
public CommandFailedEvent(@Nullable final RequestContext requestContext, final long operationId, final int requestId,
5151
final ConnectionDescription connectionDescription, final String databaseName, final String commandName,
5252
final long elapsedTimeNanos, final Throwable throwable) {
53-
super(requestContext, operationId, requestId, connectionDescription, commandName, databaseName);
53+
super(requestContext, operationId, requestId, connectionDescription, databaseName, commandName);
5454
isTrueArgument("elapsed time is not negative", elapsedTimeNanos >= 0);
5555
this.elapsedTimeNanos = elapsedTimeNanos;
5656
this.throwable = throwable;

driver-core/src/main/com/mongodb/event/CommandStartedEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public final class CommandStartedEvent extends CommandEvent {
4444
public CommandStartedEvent(@Nullable final RequestContext requestContext, final long operationId, final int requestId,
4545
final ConnectionDescription connectionDescription, final String databaseName, final String commandName,
4646
final BsonDocument command) {
47-
super(requestContext, operationId, requestId, connectionDescription, commandName, databaseName);
47+
super(requestContext, operationId, requestId, connectionDescription, databaseName, commandName);
4848
this.command = command;
4949
}
5050

driver-core/src/main/com/mongodb/event/CommandSucceededEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class CommandSucceededEvent extends CommandEvent {
5050
public CommandSucceededEvent(@Nullable final RequestContext requestContext, final long operationId, final int requestId,
5151
final ConnectionDescription connectionDescription, final String databaseName, final String commandName,
5252
final BsonDocument response, final long elapsedTimeNanos) {
53-
super(requestContext, operationId, requestId, connectionDescription, commandName, databaseName);
53+
super(requestContext, operationId, requestId, connectionDescription, databaseName, commandName);
5454
this.response = response;
5555
isTrueArgument("elapsed time is not negative", elapsedTimeNanos >= 0);
5656
this.elapsedTimeNanos = elapsedTimeNanos;

0 commit comments

Comments
 (0)