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 4646551f89..1bd6c41cf7 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,8 +96,7 @@ 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 f068dbe854..e34a745da7 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) {