fix(manager-api-beans): implement `hashCode` and `equals` on DeveloperBean
fix(gateway-engine): reinstate 10MB default for cache size for InMemoryCacheStoreComponent
MODIFY
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/InMemoryCacheStoreComponent.java
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/InMemoryCacheStoreComponent.java
@@ -68,7 +68,7 @@ public class InMemoryCacheStoreComponent implements ICacheStoreComponent {
GenericOptionsParser optParser = new GenericOptionsParser(config);
this.maxCacheSize = optParser.getLong(
keys("maxCacheSize"),
- 0L,
+ 10 * 1024 * 1024L,
Predicates.greaterThanZeroLong(),
Predicates.greaterThanZeroMsg()
);

MODIFY
manager/api/beans/src/main/java/io/apiman/manager/api/beans/developers/DeveloperBean.java
manager/api/beans/src/main/java/io/apiman/manager/api/beans/developers/DeveloperBean.java
@@ -18,6 +18,7 @@ package io.apiman.manager.api.beans.developers;
import java.io.Serializable;
import java.util.LinkedHashSet;
+import java.util.Objects;
import java.util.Set;
import javax.persistence.CollectionTable;
import javax.persistence.ElementCollection;
@@ -99,4 +100,21 @@ public class DeveloperBean implements Serializable {
public String toString() {
return "DeveloperBean [id=" + id + ",clients=" + clients + "]";
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeveloperBean that = (DeveloperBean) o;
+ return Objects.equals(id, that.id);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id);
+ }
}

MODIFY
manager/api/beans/src/main/java/io/apiman/manager/api/beans/developers/DeveloperMappingBean.java
manager/api/beans/src/main/java/io/apiman/manager/api/beans/developers/DeveloperMappingBean.java
package io.apiman.manager.api.beans.developers;
import java.io.Serializable;
+import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Entity;
@@ -80,5 +81,21 @@ public class DeveloperMappingBean implements Serializable {
return "DeveloperMappingBean [clientId=" + clientId + ",organizationId=" + organizationId + "]";
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeveloperMappingBean that = (DeveloperMappingBean) o;
+ return Objects.equals(clientId, that.clientId) && Objects.equals(organizationId, that.organizationId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(clientId, organizationId);
+ }
}

fix(manager-api-beans): implement `hashCode` and `equals` on DeveloperBean 

fix(gateway-engine): reinstate 10MB default for cache size for InMemoryCacheStoreComponent