From 29d943429cc0742eaef52095be73c27cc856c34b Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Wed, 25 Nov 2015 17:59:41 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-5393 Reverting commit because allowing 0 doesn't actually set the usage to 0 size. It ends up disabling the check all together which was the opposite intention of the commit. This reverts commit 3b658f8e1aa8c9170b8d414fe8cd05c6826b490a. --- .../src/main/java/org/apache/activemq/usage/StoreUsage.java | 3 ++- .../src/main/java/org/apache/activemq/usage/TempUsage.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java b/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java index 1bd6c41cf7..4646551f89 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java +++ b/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java @@ -96,7 +96,8 @@ public class StoreUsage extends PercentLimitUsage { protected void updateLimitBasedOnPercent() { usageLock.writeLock().lock(); try { - if (percentLimit >= 0 && store != null) { + + if (percentLimit > 0 && store != null) { File dir = StoreUtil.findParentDirectory(store.getDirectory()); if (dir != null) { diff --git a/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java b/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java index e34a745da7..f068dbe854 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java +++ b/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java @@ -76,7 +76,7 @@ public class TempUsage extends PercentLimitUsage { protected void updateLimitBasedOnPercent() { usageLock.writeLock().lock(); try { - if (percentLimit >= 0 && store != null) { + if (percentLimit > 0 && store != null) { File dir = StoreUtil.findParentDirectory(store.getDirectory()); if (dir != null) {