StoreInfo store = (StoreInfo) super.doUnmarshal(result, reader, context);
// 2.1.3+ backwards compatibility check
if (store instanceof WMSStoreInfo) {
WMSStoreInfo wmsStore = (WMSStoreInfo) store;
MetadataMap metadata = wmsStore.getMetadata();
Integer maxConnections = null;
Integer connectTimeout = null;
Integer readTimeout = null;
if (metadata != null) {
maxConnections = metadata.get("maxConnections", Integer.class);
connectTimeout = metadata.get("connectTimeout", Integer.class);
readTimeout = metadata.get("readTimeout", Integer.class);
metadata.remove("maxConnections");
metadata.remove("connectTimeout");
metadata.remove("readTimeout");
}
if (wmsStore.getMaxConnections() <= 0) {
wmsStore.setMaxConnections(maxConnections != null
&& maxConnections.intValue() > 0 ? maxConnections
: WMSStoreInfoImpl.DEFAULT_MAX_CONNECTIONS);