commit | f943fd9bfbe4f55ba8cc5b551dd980ff18b53a17 | [log] [tgz] |
---|---|---|
author | Felix Meschberger <fmeschbe@apache.org> | Mon May 18 06:09:09 2009 +0000 |
committer | Felix Meschberger <fmeschbe@apache.org> | Mon May 18 06:09:09 2009 +0000 |
tree | f2b840fa7921031aa5b7e9ace3a7947486a82b21 | |
parent | 22adc7c18059d37b70c2d5eb4134f41ff1847720 [diff] |
FELIX-1164 ensure maxSize is not negative before resizing the vector git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@775823 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java index 278cf11..9d7b1b8 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
@@ -814,9 +814,10 @@ } } - // but ensure size + // but ensure size (check for positive value since + // abs(Integer.MIN_VALUE) is still INTEGER.MIN_VALUE) int maxSize = Math.abs( ad.getCardinality() ); - if ( vec.size() > maxSize ) + if ( vec.size() > maxSize && maxSize > 0 ) { vec.setSize( maxSize ); }