All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gerrit.server.account.externalids.AutoValue_ExternalId_Key Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc3
Show newest version
package com.google.gerrit.server.account.externalids;

import com.google.errorprone.annotations.concurrent.LazyInit;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;

@Generated("com.google.auto.value.extension.memoized.processor.MemoizeExtension")
final class AutoValue_ExternalId_Key extends $AutoValue_ExternalId_Key {
  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ObjectId sha1;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ObjectId caseSensitiveSha1;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile int hashCode;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile boolean hashCode$Memoized;

  AutoValue_ExternalId_Key(String scheme$, String id$, boolean isCaseInsensitive$) {
    super(scheme$, id$, isCaseInsensitive$);
  }

  @Override
  public ObjectId sha1() {
    if (sha1 == null) {
      synchronized (this) {
        if (sha1 == null) {
          sha1 = super.sha1();
          if (sha1 == null) {
            throw new NullPointerException("sha1() cannot return null");
          }
        }
      }
    }
    return sha1;
  }

  @Override
  public ObjectId caseSensitiveSha1() {
    if (caseSensitiveSha1 == null) {
      synchronized (this) {
        if (caseSensitiveSha1 == null) {
          caseSensitiveSha1 = super.caseSensitiveSha1();
          if (caseSensitiveSha1 == null) {
            throw new NullPointerException("caseSensitiveSha1() cannot return null");
          }
        }
      }
    }
    return caseSensitiveSha1;
  }

  @Override
  public int hashCode() {
    if (!hashCode$Memoized) {
      synchronized (this) {
        if (!hashCode$Memoized) {
          hashCode = super.hashCode();
          hashCode$Memoized = true;
        }
      }
    }
    return hashCode;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy