final class com.mongodb.operation.UserOperationHelper
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.mongodb.operation.UserOperationHelper
super_class: java.lang.Object
{
private static final com.mongodb.connection.ServerVersion FOUR_ZERO;
descriptor: Lcom/mongodb/connection/ServerVersion;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: new com.mongodb.connection.ServerVersion
dup
iconst_4
iconst_0
invokespecial com.mongodb.connection.ServerVersion.<init>:(II)V
putstatic com.mongodb.operation.UserOperationHelper.FOUR_ZERO:Lcom/mongodb/connection/ServerVersion;
return
LocalVariableTable:
Start End Slot Name Signature
static org.bson.BsonDocument asCommandDocument(com.mongodb.MongoCredential, com.mongodb.connection.ConnectionDescription, boolean, java.lang.String);
descriptor: (Lcom/mongodb/MongoCredential;Lcom/mongodb/connection/ConnectionDescription;ZLjava/lang/String;)Lorg/bson/BsonDocument;
flags: (0x0008) ACC_STATIC
Code:
stack=8, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
invokestatic com.mongodb.internal.operation.ServerVersionHelper.serverIsAtLeastVersionFourDotZero:(Lcom/mongodb/connection/ConnectionDescription;)Z
istore 4
start local 4 1: new org.bson.BsonDocument
dup
invokespecial org.bson.BsonDocument.<init>:()V
astore 5
start local 5 2: aload 5
aload 3
new org.bson.BsonString
dup
aload 0
invokestatic com.mongodb.operation.UserOperationHelper.getUserNameNonNull:(Lcom/mongodb/MongoCredential;)Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
3: iload 4
ifeq 6
4: aload 5
ldc "pwd"
new org.bson.BsonString
dup
new java.lang.String
dup
aload 0
invokestatic com.mongodb.operation.UserOperationHelper.getPasswordNonNull:(Lcom/mongodb/MongoCredential;)[C
invokespecial java.lang.String.<init>:([C)V
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
5: goto 7
6: StackMap locals: int org.bson.BsonDocument
StackMap stack:
aload 5
ldc "pwd"
new org.bson.BsonString
dup
aload 0
invokestatic com.mongodb.operation.UserOperationHelper.getUserNameNonNull:(Lcom/mongodb/MongoCredential;)Ljava/lang/String;
aload 0
invokestatic com.mongodb.operation.UserOperationHelper.getPasswordNonNull:(Lcom/mongodb/MongoCredential;)[C
invokestatic com.mongodb.internal.authentication.NativeAuthenticationHelper.createAuthenticationHash:(Ljava/lang/String;[C)Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
7: StackMap locals:
StackMap stack:
aload 5
ldc "digestPassword"
iload 4
invokestatic org.bson.BsonBoolean.valueOf:(Z)Lorg/bson/BsonBoolean;
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
8: aload 5
ldc "roles"
new org.bson.BsonArray
dup
new org.bson.BsonString
dup
aload 0
iload 2
invokestatic com.mongodb.operation.UserOperationHelper.getRoleName:(Lcom/mongodb/MongoCredential;Z)Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokestatic java.util.Collections.singletonList:(Ljava/lang/Object;)Ljava/util/List;
invokespecial org.bson.BsonArray.<init>:(Ljava/util/List;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
9: aload 5
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 credential Lcom/mongodb/MongoCredential;
0 10 1 connectionDescription Lcom/mongodb/connection/ConnectionDescription;
0 10 2 readOnly Z
0 10 3 commandName Ljava/lang/String;
1 10 4 serverDigestPassword Z
2 10 5 document Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
credential final
connectionDescription final
readOnly final
commandName final
private static java.lang.String getRoleName(com.mongodb.MongoCredential, boolean);
descriptor: (Lcom/mongodb/MongoCredential;Z)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.mongodb.MongoCredential.getSource:()Ljava/lang/String;
ldc "admin"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 3
1: iload 1
ifeq 2
ldc "readAnyDatabase"
goto 5
StackMap locals:
StackMap stack:
2: ldc "root"
goto 5
StackMap locals:
StackMap stack:
3: iload 1
ifeq 4
ldc "read"
goto 5
StackMap locals:
StackMap stack:
4: ldc "dbOwner"
5: StackMap locals:
StackMap stack: java.lang.String
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 credential Lcom/mongodb/MongoCredential;
0 6 1 readOnly Z
MethodParameters:
Name Flags
credential final
readOnly final
static void translateUserCommandException(com.mongodb.MongoCommandException);
descriptor: (Lcom/mongodb/MongoCommandException;)V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.MongoCommandException.getErrorCode:()I
bipush 100
if_icmpne 2
aload 0
invokevirtual com.mongodb.MongoCommandException.getResponse:()Lorg/bson/BsonDocument;
invokestatic com.mongodb.internal.operation.WriteConcernHelper.hasWriteConcernError:(Lorg/bson/BsonDocument;)Z
ifeq 2
1: aload 0
invokevirtual com.mongodb.MongoCommandException.getResponse:()Lorg/bson/BsonDocument;
aload 0
invokevirtual com.mongodb.MongoCommandException.getServerAddress:()Lcom/mongodb/ServerAddress;
invokestatic com.mongodb.internal.operation.WriteConcernHelper.createWriteConcernException:(Lorg/bson/BsonDocument;Lcom/mongodb/ServerAddress;)Lcom/mongodb/MongoWriteConcernException;
athrow
2: StackMap locals:
StackMap stack:
aload 0
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 e Lcom/mongodb/MongoCommandException;
MethodParameters:
Name Flags
e final
static com.mongodb.async.SingleResultCallback<java.lang.Void> userCommandCallback(com.mongodb.async.SingleResultCallback<java.lang.Void>);
descriptor: (Lcom/mongodb/async/SingleResultCallback;)Lcom/mongodb/async/SingleResultCallback;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new com.mongodb.operation.UserOperationHelper$1
dup
aload 0
invokespecial com.mongodb.operation.UserOperationHelper$1.<init>:(Lcom/mongodb/async/SingleResultCallback;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 wrappedCallback Lcom/mongodb/async/SingleResultCallback<Ljava/lang/Void;>;
Signature: (Lcom/mongodb/async/SingleResultCallback<Ljava/lang/Void;>;)Lcom/mongodb/async/SingleResultCallback<Ljava/lang/Void;>;
MethodParameters:
Name Flags
wrappedCallback final
private static java.lang.String getUserNameNonNull(com.mongodb.MongoCredential);
descriptor: (Lcom/mongodb/MongoCredential;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.MongoCredential.getUserName:()Ljava/lang/String;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: new com.mongodb.MongoInternalException
dup
ldc "User name can not be null"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.lang.String
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 credential Lcom/mongodb/MongoCredential;
1 4 1 userName Ljava/lang/String;
RuntimeVisibleAnnotations:
com.mongodb.lang.NonNull()
MethodParameters:
Name Flags
credential final
private static char[] getPasswordNonNull(com.mongodb.MongoCredential);
descriptor: (Lcom/mongodb/MongoCredential;)[C
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.MongoCredential.getPassword:()[C
astore 1
start local 1 1: aload 1
ifnonnull 3
2: new com.mongodb.MongoInternalException
dup
ldc "Password can not be null"
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: char[]
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 credential Lcom/mongodb/MongoCredential;
1 4 1 password [C
RuntimeVisibleAnnotations:
com.mongodb.lang.NonNull()
MethodParameters:
Name Flags
credential final
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/operation/UserOperationHelper;
}
SourceFile: "UserOperationHelper.java"
NestMembers:
com.mongodb.operation.UserOperationHelper$1
InnerClasses:
com.mongodb.operation.UserOperationHelper$1