Skip to content

Commit

Permalink
loading correct class (#22689)
Browse files Browse the repository at this point in the history
Cosmos DB fixing loading correct class bug.
  • Loading branch information
moderakh authored Jul 2, 2021
1 parent d2859e9 commit 071ca6a
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ private CosmosClientBuilderHelper() {}

public static void setCosmosClientBuilderAccessor(final CosmosClientBuilderAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("CosmosClientBuilderHelper accessor already initialized!");
throw new IllegalStateException("CosmosClientBuilder accessor already initialized!");
}

accessor = newAccessor;
}

static CosmosClientBuilderAccessor getCosmosClientBuilderAccessor() {
if (accessor == null) {
throw new IllegalStateException("CosmosClientBuilderHelper accessor is not initialized yet!");
throw new IllegalStateException("CosmosClientBuilder accessor is not initialized yet!");
}

return accessor;
Expand All @@ -64,15 +64,15 @@ private PartitionKeyHelper() {}

public static void setPartitionKeyAccessor(final PartitionKeyAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("PartitionKeyHelper accessor already initialized!");
throw new IllegalStateException("PartitionKey accessor already initialized!");
}

accessor = newAccessor;
}

public static PartitionKeyAccessor getPartitionKeyAccessor() {
if (accessor == null) {
throw new IllegalStateException("PartitionKeyHelper accessor is not initialized!");
throw new IllegalStateException("PartitionKey accessor is not initialized!");
}

return accessor;
Expand All @@ -88,20 +88,20 @@ public static final class CosmosQueryRequestOptionsHelper {

private CosmosQueryRequestOptionsHelper() {}
static {
ensureClassLoaded(CosmosQueryRequestOptionsHelper.class);
ensureClassLoaded(CosmosQueryRequestOptions.class);
}

public static void setCosmosQueryRequestOptionsAccessor(final CosmosQueryRequestOptionsAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("CosmosQueryRequestOptionsHelper accessor already initialized!");
throw new IllegalStateException("CosmosQueryRequestOptions accessor already initialized!");
}

accessor = newAccessor;
}

public static CosmosQueryRequestOptionsAccessor getCosmosQueryRequestOptionsAccessor() {
if (accessor == null) {
throw new IllegalStateException("CosmosQueryRequestOptionsHelper accessor is not initialized yet!");
throw new IllegalStateException("CosmosQueryRequestOptions accessor is not initialized yet!");
}

return accessor;
Expand All @@ -118,20 +118,20 @@ public static final class CosmosItemRequestOptionsHelper {

private CosmosItemRequestOptionsHelper() {}
static {
ensureClassLoaded(CosmosQueryRequestOptionsHelper.class);
ensureClassLoaded(CosmosItemRequestOptions.class);
}

public static void setCosmosItemRequestOptionsAccessor(final CosmosItemRequestOptionsAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("CosmosQueryRequestOptionsHelper accessor already initialized!");
throw new IllegalStateException("CosmosItemRequestOptions accessor already initialized!");
}

accessor = newAccessor;
}

public static CosmosItemRequestOptionsAccessor getCosmosItemRequestOptionsAccessor() {
if (accessor == null) {
throw new IllegalStateException("CosmosQueryRequestOptionsHelper accessor is not initialized yet!");
throw new IllegalStateException("CosmosItemRequestOptions accessor is not initialized yet!");
}

return accessor;
Expand All @@ -149,20 +149,20 @@ public static final class CosmosBulkProcessingOptionsHelper {

private CosmosBulkProcessingOptionsHelper() {}
static {
ensureClassLoaded(CosmosQueryRequestOptionsHelper.class);
ensureClassLoaded(BulkProcessingOptions.class);
}

public static void setCosmosBulkProcessingOptionAccessor(final CosmosBulkProcessingOptionAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("CosmosQueryRequestOptionsHelper accessor already initialized!");
throw new IllegalStateException("BulkProcessingOptions accessor already initialized!");
}

accessor = newAccessor;
}

public static CosmosBulkProcessingOptionAccessor getCosmosBulkProcessingOptionAccessor() {
if (accessor == null) {
throw new IllegalStateException("CosmosQueryRequestOptionsHelper accessor is not initialized yet!");
throw new IllegalStateException("BulkProcessingOptions accessor is not initialized yet!");
}

return accessor;
Expand All @@ -186,15 +186,15 @@ private CosmosItemResponseHelper() {

public static void setCosmosItemResponseBuilderAccessor(final CosmosItemResponseBuilderAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("CosmosItemResponseBuilder accessor already initialized!");
throw new IllegalStateException("CosmosItemResponse accessor already initialized!");
}

accessor = newAccessor;
}

public static CosmosItemResponseBuilderAccessor getCosmosItemResponseBuilderAccessor() {
if (accessor == null) {
throw new IllegalStateException("CosmosItemResponseBuilder accessor is not initialized yet!");
throw new IllegalStateException("CosmosItemResponse accessor is not initialized yet!");
}

return accessor;
Expand Down Expand Up @@ -225,15 +225,15 @@ private CosmosClientHelper() {

public static void setCosmosClientAccessor(final CosmosClientAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("CosmosClientAccessor accessor already initialized!");
throw new IllegalStateException("CosmosClient accessor already initialized!");
}

accessor = newAccessor;
}

public static CosmosClientAccessor geCosmosClientAccessor() {
if (accessor == null) {
throw new IllegalStateException("CosmosClientAccessor accessor is not initialized yet!");
throw new IllegalStateException("CosmosClient accessor is not initialized yet!");
}

return accessor;
Expand All @@ -249,20 +249,20 @@ public static final class BulkProcessingThresholdsHelper {

private BulkProcessingThresholdsHelper() {}
static {
ensureClassLoaded(BulkProcessingThresholdsHelper.class);
ensureClassLoaded(BulkProcessingThresholds.class);
}

public static void setBulkProcessingThresholdsAccessor(final BulkProcessingThresholdsAccessor newAccessor) {
if (accessor != null) {
throw new IllegalStateException("BulkProcessingThresholdsHelper accessor already initialized!");
throw new IllegalStateException("BulkProcessingThresholds accessor already initialized!");
}

accessor = newAccessor;
}

public static BulkProcessingThresholdsAccessor getBulkProcessingThresholdsAccessor() {
if (accessor == null) {
throw new IllegalStateException("BulkProcessingThresholdsHelper accessor is not initialized yet!");
throw new IllegalStateException("BulkProcessingThresholds accessor is not initialized yet!");
}

return accessor;
Expand Down

0 comments on commit 071ca6a

Please sign in to comment.