Repository: activemq
Updated Branches:
  refs/heads/master 8f30866fd -> 29d943429


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.


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/29d94342
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/29d94342
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/29d94342

Branch: refs/heads/master
Commit: 29d943429cc0742eaef52095be73c27cc856c34b
Parents: 8f30866
Author: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com>
Authored: Wed Nov 25 17:59:41 2015 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com>
Committed: Wed Nov 25 17:59:41 2015 +0000

----------------------------------------------------------------------
 .../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(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/29d94342/activemq-broker/src/main/java/org/apache/activemq/usage/StoreUsage.java
----------------------------------------------------------------------
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 1bd6c41..4646551 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<StoreUsage> 
{
     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) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/29d94342/activemq-broker/src/main/java/org/apache/activemq/usage/TempUsage.java
----------------------------------------------------------------------
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 e34a745..f068dbe 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<TempUsage> {
     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) {

Reply via email to