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: .line 40
            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 // com.mongodb.MongoCredential credential
        start local 1 // com.mongodb.connection.ConnectionDescription connectionDescription
        start local 2 // boolean readOnly
        start local 3 // java.lang.String commandName
         0: .line 44
            aload 1 /* connectionDescription */
            invokestatic com.mongodb.internal.operation.ServerVersionHelper.serverIsAtLeastVersionFourDotZero:(Lcom/mongodb/connection/ConnectionDescription;)Z
            istore 4 /* serverDigestPassword */
        start local 4 // boolean serverDigestPassword
         1: .line 45
            new org.bson.BsonDocument
            dup
            invokespecial org.bson.BsonDocument.<init>:()V
            astore 5 /* document */
        start local 5 // org.bson.BsonDocument document
         2: .line 46
            aload 5 /* document */
            aload 3 /* commandName */
            new org.bson.BsonString
            dup
            aload 0 /* credential */
            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: .line 47
            iload 4 /* serverDigestPassword */
            ifeq 6
         4: .line 48
            aload 5 /* document */
            ldc "pwd"
            new org.bson.BsonString
            dup
            new java.lang.String
            dup
            aload 0 /* credential */
            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: .line 49
            goto 7
         6: .line 50
      StackMap locals: int org.bson.BsonDocument
      StackMap stack:
            aload 5 /* document */
            ldc "pwd"
            new org.bson.BsonString
            dup
            aload 0 /* credential */
            invokestatic com.mongodb.operation.UserOperationHelper.getUserNameNonNull:(Lcom/mongodb/MongoCredential;)Ljava/lang/String;
            aload 0 /* credential */
            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: .line 52
      StackMap locals:
      StackMap stack:
            aload 5 /* document */
            ldc "digestPassword"
            iload 4 /* serverDigestPassword */
            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: .line 53
            aload 5 /* document */
            ldc "roles"
            new org.bson.BsonArray
            dup
            new org.bson.BsonString
            dup
            aload 0 /* credential */
            iload 2 /* readOnly */
            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: .line 54
            aload 5 /* document */
            areturn
        end local 5 // org.bson.BsonDocument document
        end local 4 // boolean serverDigestPassword
        end local 3 // java.lang.String commandName
        end local 2 // boolean readOnly
        end local 1 // com.mongodb.connection.ConnectionDescription connectionDescription
        end local 0 // com.mongodb.MongoCredential credential
      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 // com.mongodb.MongoCredential credential
        start local 1 // boolean readOnly
         0: .line 58
            aload 0 /* credential */
            invokevirtual com.mongodb.MongoCredential.getSource:()Ljava/lang/String;
            ldc "admin"
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifeq 3
         1: .line 59
            iload 1 /* readOnly */
            ifeq 2
            ldc "readAnyDatabase"
            goto 5
      StackMap locals:
      StackMap stack:
         2: ldc "root"
            goto 5
      StackMap locals:
      StackMap stack:
         3: iload 1 /* readOnly */
            ifeq 4
            ldc "read"
            goto 5
      StackMap locals:
      StackMap stack:
         4: ldc "dbOwner"
         5: .line 58
      StackMap locals:
      StackMap stack: java.lang.String
            areturn
        end local 1 // boolean readOnly
        end local 0 // com.mongodb.MongoCredential credential
      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 // com.mongodb.MongoCommandException e
         0: .line 63
            aload 0 /* e */
            invokevirtual com.mongodb.MongoCommandException.getErrorCode:()I
            bipush 100
            if_icmpne 2
            aload 0 /* e */
            invokevirtual com.mongodb.MongoCommandException.getResponse:()Lorg/bson/BsonDocument;
            invokestatic com.mongodb.internal.operation.WriteConcernHelper.hasWriteConcernError:(Lorg/bson/BsonDocument;)Z
            ifeq 2
         1: .line 64
            aload 0 /* e */
            invokevirtual com.mongodb.MongoCommandException.getResponse:()Lorg/bson/BsonDocument;
            aload 0 /* e */
            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: .line 66
      StackMap locals:
      StackMap stack:
            aload 0 /* e */
            athrow
        end local 0 // com.mongodb.MongoCommandException e
      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 // com.mongodb.async.SingleResultCallback wrappedCallback
         0: .line 71
            new com.mongodb.operation.UserOperationHelper$1
            dup
            aload 0 /* wrappedCallback */
            invokespecial com.mongodb.operation.UserOperationHelper$1.<init>:(Lcom/mongodb/async/SingleResultCallback;)V
            areturn
        end local 0 // com.mongodb.async.SingleResultCallback wrappedCallback
      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 // com.mongodb.MongoCredential credential
         0: .line 92
            aload 0 /* credential */
            invokevirtual com.mongodb.MongoCredential.getUserName:()Ljava/lang/String;
            astore 1 /* userName */
        start local 1 // java.lang.String userName
         1: .line 93
            aload 1 /* userName */
            ifnonnull 3
         2: .line 94
            new com.mongodb.MongoInternalException
            dup
            ldc "User name can not be null"
            invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 96
      StackMap locals: java.lang.String
      StackMap stack:
            aload 1 /* userName */
            areturn
        end local 1 // java.lang.String userName
        end local 0 // com.mongodb.MongoCredential credential
      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 // com.mongodb.MongoCredential credential
         0: .line 101
            aload 0 /* credential */
            invokevirtual com.mongodb.MongoCredential.getPassword:()[C
            astore 1 /* password */
        start local 1 // char[] password
         1: .line 102
            aload 1 /* password */
            ifnonnull 3
         2: .line 103
            new com.mongodb.MongoInternalException
            dup
            ldc "Password can not be null"
            invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 105
      StackMap locals: char[]
      StackMap stack:
            aload 1 /* password */
            areturn
        end local 1 // char[] password
        end local 0 // com.mongodb.MongoCredential credential
      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 // com.mongodb.operation.UserOperationHelper this
         0: .line 108
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 109
            return
        end local 0 // com.mongodb.operation.UserOperationHelper this
      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