You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "jeanouii (via GitHub)" <gi...@apache.org> on 2026/01/28 11:11:53 UTC
[PR] AMQ9844 Refactor ReloadableProperties and PropertiesLoginModuleRaceCo… [activemq]
jeanouii opened a new pull request, #1636:
URL: https://github.com/apache/activemq/pull/1636
…nditionTest to improve error handling and concurrency management
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] AMQ9844 Refactor ReloadableProperties and PropertiesLoginModuleRaceCo… [activemq]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #1636:
URL: https://github.com/apache/activemq/pull/1636#discussion_r2751446085
##########
activemq-jaas/src/main/java/org/apache/activemq/jaas/ReloadableProperties.java:
##########
@@ -49,19 +49,25 @@ public synchronized Properties getProps() {
public synchronized ReloadableProperties obtained() {
if (reloadTime < 0 || (key.isReload() && hasModificationAfter(reloadTime))) {
- props = new Properties();
+ // Load into a local variable first to preserve old data if reload fails
+ // If we assigned 'props = new Properties()' first and load() throws IOException,
+ // we'd expose empty Properties. By loading into newProps first, we preserve the
+ // old data if the reload fails.
+ final Properties newProps = new Properties();
Review Comment:
I see it now. Thanks ! Sorry I missed it.
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] AMQ9844 Refactor ReloadableProperties and PropertiesLoginModuleRaceCo… [activemq]
Posted by "jeanouii (via GitHub)" <gi...@apache.org>.
jeanouii commented on code in PR #1636:
URL: https://github.com/apache/activemq/pull/1636#discussion_r2751443118
##########
activemq-jaas/src/main/java/org/apache/activemq/jaas/ReloadableProperties.java:
##########
@@ -49,19 +49,25 @@ public synchronized Properties getProps() {
public synchronized ReloadableProperties obtained() {
if (reloadTime < 0 || (key.isReload() && hasModificationAfter(reloadTime))) {
- props = new Properties();
+ // Load into a local variable first to preserve old data if reload fails
+ // If we assigned 'props = new Properties()' first and load() throws IOException,
+ // we'd expose empty Properties. By loading into newProps first, we preserve the
+ // old data if the reload fails.
+ final Properties newProps = new Properties();
Review Comment:
A few lines bellow.
Line 60
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] AMQ9844 Refactor ReloadableProperties and PropertiesLoginModuleRaceCo… [activemq]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #1636:
URL: https://github.com/apache/activemq/pull/1636
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] AMQ9844 Refactor ReloadableProperties and PropertiesLoginModuleRaceCo… [activemq]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #1636:
URL: https://github.com/apache/activemq/pull/1636#discussion_r2750674138
##########
activemq-jaas/src/main/java/org/apache/activemq/jaas/ReloadableProperties.java:
##########
@@ -49,19 +49,25 @@ public synchronized Properties getProps() {
public synchronized ReloadableProperties obtained() {
if (reloadTime < 0 || (key.isReload() && hasModificationAfter(reloadTime))) {
- props = new Properties();
+ // Load into a local variable first to preserve old data if reload fails
+ // If we assigned 'props = new Properties()' first and load() throws IOException,
+ // we'd expose empty Properties. By loading into newProps first, we preserve the
+ // old data if the reload fails.
+ final Properties newProps = new Properties();
Review Comment:
I don't see the global `props` updated with `newProps`. Should we cleanup `props` ?
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact