diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ImplementationBridgeHelpers.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ImplementationBridgeHelpers.java index e5264a34ae02..705501426e77 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ImplementationBridgeHelpers.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ImplementationBridgeHelpers.java @@ -32,7 +32,7 @@ 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; @@ -40,7 +40,7 @@ public static void setCosmosClientBuilderAccessor(final CosmosClientBuilderAcces 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; @@ -64,7 +64,7 @@ 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; @@ -72,7 +72,7 @@ public static void setPartitionKeyAccessor(final PartitionKeyAccessor newAccesso 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; @@ -88,12 +88,12 @@ 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; @@ -101,7 +101,7 @@ public static void setCosmosQueryRequestOptionsAccessor(final CosmosQueryRequest 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; @@ -118,12 +118,12 @@ 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; @@ -131,7 +131,7 @@ public static void setCosmosItemRequestOptionsAccessor(final CosmosItemRequestOp 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; @@ -149,12 +149,12 @@ 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; @@ -162,7 +162,7 @@ public static void setCosmosBulkProcessingOptionAccessor(final CosmosBulkProcess 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; @@ -186,7 +186,7 @@ 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; @@ -194,7 +194,7 @@ public static void setCosmosItemResponseBuilderAccessor(final CosmosItemResponse 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; @@ -225,7 +225,7 @@ 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; @@ -233,7 +233,7 @@ public static void setCosmosClientAccessor(final CosmosClientAccessor newAccesso 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; @@ -249,12 +249,12 @@ 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; @@ -262,7 +262,7 @@ public static void setBulkProcessingThresholdsAccessor(final BulkProcessingThres 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;