gemmellr commented on code in PR #4729:
URL: https://github.com/apache/activemq-artemis/pull/4729#discussion_r1453163076


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/routing/CacheConfiguration.java:
##########
@@ -43,4 +52,12 @@ public CacheConfiguration setTimeout(int timeout) {
       this.timeout = timeout;
       return this;
    }
+
+   public CacheConfiguration() {
+
+   }
+
+   public CacheConfiguration(boolean enabled) {
+      this.enabled = enabled;
+   }

Review Comment:
   Can we put the constructors at the top given their importance in this case 
(will also minimise the diff in this case as one was there already)



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java:
##########
@@ -2871,6 +2871,9 @@ private void parseConnectionRouterConfiguration(final 
Element e, final Configura
    }
 
    private void parseCacheConfiguration(final Element e, final 
CacheConfiguration cacheConfiguration) throws ClassNotFoundException {
+      cacheConfiguration.setEnabled(getBoolean(e, "enabled",
+         cacheConfiguration.isEnabled()));

Review Comment:
   Feels like this would be better defaulting to simply the literal "true" per 
the xsd as you had it originally?



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/routing/PoolConfiguration.java:
##########
@@ -118,4 +129,12 @@ public PoolConfiguration setDiscoveryGroupName(String 
discoveryGroupName) {
       this.discoveryGroupName = discoveryGroupName;
       return this;
    }
+
+   public PoolConfiguration() {
+
+   }
+
+   public PoolConfiguration(boolean enabled) {
+      this.enabled = enabled;
+   }

Review Comment:
   Ditto



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java:
##########
@@ -2889,6 +2892,9 @@ private void parsePolicyConfiguration(final Element e, 
final NamedPropertyConfig
    }
 
    private void parsePoolConfiguration(final Element e, final Configuration 
config, final PoolConfiguration poolConfiguration) throws Exception {
+      poolConfiguration.setEnabled(getBoolean(e, "enabled",
+         poolConfiguration.isEnabled()));

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to