mirror of https://github.com/apache/activemq.git
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 3b658f8e1a
.
This commit is contained in:
parent
8f30866fdf
commit
29d943429c
|
@ -96,7 +96,8 @@ public class StoreUsage extends PercentLimitUsage<StoreUsage> {
|
||||||
protected void updateLimitBasedOnPercent() {
|
protected void updateLimitBasedOnPercent() {
|
||||||
usageLock.writeLock().lock();
|
usageLock.writeLock().lock();
|
||||||
try {
|
try {
|
||||||
if (percentLimit >= 0 && store != null) {
|
|
||||||
|
if (percentLimit > 0 && store != null) {
|
||||||
File dir = StoreUtil.findParentDirectory(store.getDirectory());
|
File dir = StoreUtil.findParentDirectory(store.getDirectory());
|
||||||
|
|
||||||
if (dir != null) {
|
if (dir != null) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class TempUsage extends PercentLimitUsage<TempUsage> {
|
||||||
protected void updateLimitBasedOnPercent() {
|
protected void updateLimitBasedOnPercent() {
|
||||||
usageLock.writeLock().lock();
|
usageLock.writeLock().lock();
|
||||||
try {
|
try {
|
||||||
if (percentLimit >= 0 && store != null) {
|
if (percentLimit > 0 && store != null) {
|
||||||
File dir = StoreUtil.findParentDirectory(store.getDirectory());
|
File dir = StoreUtil.findParentDirectory(store.getDirectory());
|
||||||
|
|
||||||
if (dir != null) {
|
if (dir != null) {
|
||||||
|
|
Loading…
Reference in New Issue