diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java index 80d79e08..3b850ee7 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequest.java @@ -277,7 +277,7 @@ public static CreateServiceInstanceBindingRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -305,7 +305,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceDefinitionId, serviceInstanceId, planId, bindingId, appGuid, bindResource, serviceDefinition, plan); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java index 329a23e0..50d73b91 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequest.java @@ -184,7 +184,7 @@ public static DeleteServiceInstanceBindingRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -210,7 +210,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceInstanceId, bindingId, serviceDefinitionId, planId, serviceDefinition, plan); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java index 9aaf1797..78d3521c 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequest.java @@ -148,7 +148,7 @@ public static GetLastServiceBindingOperationRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -173,7 +173,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceInstanceId, bindingId, serviceDefinitionId, planId, operation); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java index df4561cf..6a00a83a 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponse.java @@ -104,7 +104,7 @@ public static GetLastServiceBindingOperationResponseBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -112,13 +112,24 @@ public final boolean equals(Object o) { return false; } GetLastServiceBindingOperationResponse that = (GetLastServiceBindingOperationResponse) o; - return deleteOperation == that.deleteOperation && + return that.canEqual(this) && + deleteOperation == that.deleteOperation && state == that.state && Objects.equals(description, that.description); } + /** + * Is another object type compatible with this object + * + * @param other the other object + * @return true of compatible + */ + public boolean canEqual(Object other) { + return other instanceof GetLastServiceBindingOperationResponse; + } + @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(state, description, deleteOperation); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java index 21ab7bdb..c2de2c3e 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequest.java @@ -129,7 +129,7 @@ public static GetServiceInstanceBindingRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -153,7 +153,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceInstanceId, bindingId, serviceDefinitionId, planId); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java index 0bfde976..e149e0ba 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/Catalog.java @@ -69,7 +69,7 @@ public List getServiceDefinitions() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -77,11 +77,21 @@ public final boolean equals(Object o) { return false; } Catalog catalog = (Catalog) o; - return Objects.equals(serviceDefinitions, catalog.serviceDefinitions); + return catalog.canEqual(this) && Objects.equals(serviceDefinitions, catalog.serviceDefinitions); + } + + /** + * Is another object type compatible with this object + * + * @param other the other object + * @return true of compatible + */ + public boolean canEqual(Object other) { + return other instanceof Catalog; } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(serviceDefinitions); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java index 94eb806b..14efc45f 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinition.java @@ -251,7 +251,7 @@ public static ServiceDefinitionBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -259,7 +259,8 @@ public final boolean equals(Object o) { return false; } ServiceDefinition that = (ServiceDefinition) o; - return bindable == that.bindable && + return that.canEqual(this) && + bindable == that.bindable && Objects.equals(planUpdateable, that.planUpdateable) && Objects.equals(instancesRetrievable, that.instancesRetrievable) && Objects.equals(bindingsRetrievable, that.bindingsRetrievable) && @@ -274,8 +275,18 @@ public final boolean equals(Object o) { Objects.equals(dashboardClient, that.dashboardClient); } + /** + * Is another object type compatible with this object + * + * @param other the other object + * @return true of compatible + */ + public boolean canEqual(Object other) { + return other instanceof ServiceDefinition; + } + @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(id, name, description, bindable, planUpdateable, instancesRetrievable, bindingsRetrievable, allowContextUpdates, plans, tags, metadata, requires, dashboardClient); diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java index a55e7fe6..877f4f98 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequest.java @@ -324,7 +324,7 @@ public static CreateServiceInstanceRequestBuilder builder() { * {@inheritDoc} */ @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -352,7 +352,7 @@ public boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceDefinitionId, planId, organizationGuid, spaceGuid, serviceInstanceId, serviceDefinition, plan, maintenanceInfo); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java index b6779436..ae088a40 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponse.java @@ -110,7 +110,7 @@ public static CreateServiceInstanceResponseBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -133,7 +133,7 @@ public boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), dashboardUrl, instanceExisted, metadata); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java index 0aa0b47b..f972d169 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequest.java @@ -168,7 +168,7 @@ public static DeleteServiceInstanceRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -193,7 +193,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceInstanceId, serviceDefinitionId, planId, serviceDefinition, plan); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java index db9ba688..5ff9f516 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequest.java @@ -130,7 +130,7 @@ public static GetLastServiceOperationRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -154,7 +154,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceInstanceId, serviceDefinitionId, planId, operation); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java index 0afcca48..8b3d9b3f 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponse.java @@ -146,8 +146,18 @@ public static GetLastServiceOperationResponseBuilder builder() { return new GetLastServiceOperationResponseBuilder(); } + /** + * Is another object type compatible with this object + * + * @param other the other object + * @return true of compatible + */ + public boolean canEqual(Object other) { + return other instanceof GetLastServiceOperationResponse; + } + @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -155,7 +165,8 @@ public final boolean equals(Object o) { return false; } GetLastServiceOperationResponse that = (GetLastServiceOperationResponse) o; - return state == that.state && + return that.canEqual(this) && + state == that.state && Objects.equals(description, that.description) && Objects.equals(instanceUsable, that.instanceUsable) && Objects.equals(updateRepeatable, that.updateRepeatable) && @@ -163,7 +174,7 @@ public final boolean equals(Object o) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(state, description, instanceUsable, updateRepeatable, deleteOperation); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java index 56380f1f..f77a86b1 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequest.java @@ -111,7 +111,7 @@ public static GetServiceInstanceRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -134,7 +134,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceInstanceId, serviceDefinitionId, planId); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java index d1d4560b..6e6b220d 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponse.java @@ -120,7 +120,7 @@ public static GetServiceInstanceResponseBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -146,7 +146,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(serviceDefinitionId, planId, dashboardUrl, parameters); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java index c95da4da..1f732764 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequest.java @@ -240,7 +240,7 @@ public static UpdateServiceInstanceRequestBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -267,7 +267,7 @@ public final boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), serviceDefinitionId, planId, previousValues, serviceInstanceId, serviceDefinition, plan, maintenanceInfo); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java index 2c2c4393..eccf8da3 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponse.java @@ -93,7 +93,7 @@ public static UpdateServiceInstanceResponseBuilder builder() { } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -115,7 +115,7 @@ public boolean canEqual(Object other) { } @Override - public final int hashCode() { + public int hashCode() { return Objects.hash(super.hashCode(), dashboardUrl, metadata); } diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java index cc28d59a..8b7aad7e 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java @@ -37,7 +37,7 @@ public interface CatalogService { * * @return the catalog of services */ - Mono getCatalog(); + Mono getCatalog(); /** * Get a service definition from the catalog by ID. @@ -45,7 +45,7 @@ public interface CatalogService { * @param serviceId The ID of the service definition in the catalog * @return the service definition, or null if it doesn't exist */ - Mono getServiceDefinition(String serviceId); + Mono getServiceDefinition(String serviceId); /** * Return the {@link ResponseEntity} with catalog of services provided by the service broker. Implementing diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java index 16d73e21..9945840e 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceBindingService.java @@ -58,7 +58,7 @@ public interface ServiceInstanceBindingService { * @throws ServiceBrokerCreateOperationInProgressException if a an operation is in progress for the service * binding */ - default Mono createServiceInstanceBinding( + default Mono createServiceInstanceBinding( CreateServiceInstanceBindingRequest request) { return Mono.error(new UnsupportedOperationException( "This service broker does not support creating service bindings.")); @@ -74,7 +74,7 @@ default Mono createServiceInstanceBinding( * @throws ServiceInstanceBindingDoesNotExistException if a binding with the given ID is not known to the broker * @throws ServiceBrokerOperationInProgressException if a an operation is in progress for the service binding */ - default Mono getServiceInstanceBinding( + default Mono getServiceInstanceBinding( GetServiceInstanceBindingRequest request) { return Mono.error(new UnsupportedOperationException( "This service broker does not support retrieving service bindings. " + @@ -91,7 +91,7 @@ default Mono getServiceInstanceBinding( * broker * @throws ServiceInstanceBindingDoesNotExistException if a binding with the given ID is not known to the broker */ - default Mono getLastOperation( + default Mono getLastOperation( GetLastServiceBindingOperationRequest request) { return Mono .error(new UnsupportedOperationException("This service broker does not support getting the status of " + @@ -112,7 +112,7 @@ default Mono getLastOperation( * binding * @throws ServiceBrokerAsyncRequiredException if the broker requires asynchronous processing of the request */ - default Mono deleteServiceInstanceBinding( + default Mono deleteServiceInstanceBinding( DeleteServiceInstanceBindingRequest request) { return Mono.error(new UnsupportedOperationException( "This service broker does not support deleting service bindings.")); diff --git a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java index 0c444bb1..234194d5 100644 --- a/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java +++ b/spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/service/ServiceInstanceService.java @@ -61,7 +61,7 @@ public interface ServiceInstanceService { * @throws ServiceBrokerCreateOperationInProgressException if a an operation is in progress for the service * instance */ - Mono createServiceInstance(CreateServiceInstanceRequest request); + Mono createServiceInstance(CreateServiceInstanceRequest request); /** * Get the details of a service instance. @@ -74,7 +74,7 @@ public interface ServiceInstanceService { * @throws ServiceBrokerConcurrencyException if a service instance is being updated and therefore cannot be * fetched */ - default Mono getServiceInstance(GetServiceInstanceRequest request) { + default Mono getServiceInstance(GetServiceInstanceRequest request) { return Mono.error(new UnsupportedOperationException("This service broker does not support retrieving service " + "instances. The service broker should set 'instances_retrievable:false' in the service catalog, or " + "provide an implementation of the fetch instance API.")); @@ -88,7 +88,8 @@ default Mono getServiceInstance(GetServiceInstanceRe * @throws ServiceInstanceDoesNotExistException if a service instance with the given ID is not known to the * broker */ - default Mono getLastOperation(GetLastServiceOperationRequest request) { + default Mono getLastOperation( + GetLastServiceOperationRequest request) { return Mono.error(new UnsupportedOperationException("This service broker does not support getting the status " + "of an asynchronous operation. If the service broker returns '202 Accepted' in response to a " + "provision, update, or deprovision request, it must also provide an implementation of the get last " + @@ -105,7 +106,7 @@ default Mono getLastOperation(GetLastServiceOpe * @throws ServiceBrokerAsyncRequiredException if the broker requires asynchronous processing of the request * @throws ServiceBrokerDeleteOperationInProgressException if an operation is in progress for the service instance */ - Mono deleteServiceInstance(DeleteServiceInstanceRequest request); + Mono deleteServiceInstance(DeleteServiceInstanceRequest request); /** * Update a service instance. @@ -120,7 +121,8 @@ default Mono getLastOperation(GetLastServiceOpe * @throws ServiceBrokerInvalidParametersException if any parameters passed in the request are invalid * @throws ServiceBrokerUpdateOperationInProgressException if an operation is in progress for the service instance */ - default Mono updateServiceInstance(UpdateServiceInstanceRequest request) { + default Mono updateServiceInstance( + UpdateServiceInstanceRequest request) { return Mono.error(new UnsupportedOperationException("This service broker does not support updating service " + "instances. The service broker should set 'plan_updateable:false' in the service catalog, or " + "provide an implementation of the update instance API.")); diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java index 9d633bab..319847a7 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/CreateServiceInstanceBindingRequestTest.java @@ -247,6 +247,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java index a92e8384..6a8b0e09 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/DeleteServiceInstanceBindingRequestTest.java @@ -119,6 +119,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java index 5f8d331b..ea8932c2 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationRequestTest.java @@ -81,6 +81,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java index ebdf485e..7754142b 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetLastServiceBindingOperationResponseTest.java @@ -18,6 +18,7 @@ import com.jayway.jsonpath.DocumentContext; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.junit.jupiter.api.Test; import org.springframework.cloud.servicebroker.JsonUtils; @@ -117,6 +118,7 @@ private void responseWithStateIsSerializedToJson(OperationState stateValue, Stri void equalsAndHashCode() { EqualsVerifier .forClass(GetLastServiceBindingOperationResponse.class) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java index b45994f8..84b1f343 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/binding/GetServiceInstanceBindingRequestTest.java @@ -77,6 +77,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java index 4111ef31..d7461803 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/CatalogTest.java @@ -23,6 +23,7 @@ import com.jayway.jsonpath.DocumentContext; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.junit.jupiter.api.Test; import org.springframework.cloud.servicebroker.JsonUtils; @@ -111,7 +112,7 @@ void catalogWithServicesIsDeserializedFromJson() { @Test void equalsAndHashCode() { - EqualsVerifier.forClass(Catalog.class).verify(); + EqualsVerifier.forClass(Catalog.class).suppress(Warning.STRICT_INHERITANCE).verify(); } } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java index 4a241845..a06f1789 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/catalog/ServiceDefinitionTest.java @@ -21,6 +21,7 @@ import com.jayway.jsonpath.DocumentContext; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.junit.jupiter.api.Test; import org.springframework.cloud.servicebroker.JsonUtils; @@ -149,6 +150,7 @@ void serviceDefinitionWithAllFieldsIsSerializedToJson() { void equalsAndHashCode() { EqualsVerifier .forClass(ServiceDefinition.class) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java index 56e8c81e..aa0acb38 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceRequestTest.java @@ -204,6 +204,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java index 6c2df880..b8af3a75 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/CreateServiceInstanceResponseTest.java @@ -22,6 +22,7 @@ import com.jayway.jsonpath.DocumentContext; import net.bytebuddy.utility.RandomString; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.assertj.core.util.Maps; import org.junit.jupiter.api.Test; @@ -97,6 +98,7 @@ void equalsAndHashCode() { EqualsVerifier .forClass(CreateServiceInstanceResponse.class) .withRedefinedSuperclass() + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java index ddc57131..429f0e59 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/DeleteServiceInstanceRequestTest.java @@ -113,6 +113,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java index 5cf9db53..aebd51be 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationRequestTest.java @@ -76,6 +76,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java index 58549144..fd98c53a 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetLastServiceOperationResponseTest.java @@ -18,6 +18,7 @@ import com.jayway.jsonpath.DocumentContext; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.junit.jupiter.api.Test; import org.springframework.cloud.servicebroker.JsonUtils; @@ -136,6 +137,7 @@ private void responseWithStateIsSerializedToJson(OperationState stateValue, Stri void equalsAndHashCode() { EqualsVerifier .forClass(GetLastServiceOperationResponse.class) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java index 2b4deb93..5d2e938f 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceRequestTest.java @@ -73,6 +73,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java index 8bde27b0..086fccc4 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/GetServiceInstanceResponseTest.java @@ -21,6 +21,7 @@ import com.jayway.jsonpath.DocumentContext; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.junit.jupiter.api.Test; import org.springframework.cloud.servicebroker.JsonUtils; @@ -103,6 +104,7 @@ void responseWithAllValuesIsDeserialized() { void equalsAndHashCode() { EqualsVerifier .forClass(GetServiceInstanceResponse.class) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java index c46108bb..9a40cbfb 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceRequestTest.java @@ -145,6 +145,7 @@ void equalsAndHashCode() { .withRedefinedSuperclass() .suppress(Warning.NONFINAL_FIELDS) .suppress(Warning.TRANSIENT_FIELDS) + .suppress(Warning.STRICT_INHERITANCE) .verify(); } diff --git a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java index 86efc27c..897dbb9e 100755 --- a/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java +++ b/spring-cloud-open-service-broker-core/src/test/java/org/springframework/cloud/servicebroker/model/instance/UpdateServiceInstanceResponseTest.java @@ -21,6 +21,7 @@ import com.jayway.jsonpath.DocumentContext; import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; import org.assertj.core.util.Maps; import org.junit.jupiter.api.Test; @@ -88,6 +89,7 @@ void equalsAndHashCode() { EqualsVerifier .forClass(UpdateServiceInstanceResponse.class) .withRedefinedSuperclass() + .suppress(Warning.STRICT_INHERITANCE) .verify(); }