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 );
                         }