I didn't find anything either, my first assumption was that there is a test for this in the CT which doesn't seem to be the case either. So I guess this check can be removed.
Carsten 2014-08-06 3:35 GMT+02:00 David Jencks <[email protected]>: > While writing a test I discovered that config admin doesn't like empty > collections or collections with empty values as configuration values. > After searching the 5.0 config admin spec for a while I can't find any > support for these restrictions, and they are not applied to arrays. What > is the justification for these checks? > > Here's the code I'm asking about (CaseInsensitiveDictionary lines 309ff) > > if ( collection.isEmpty() ) > { > throw new IllegalArgumentException( "Collection must not > be empty" ); > } > > // ensure all elements have the same type and to internal list > Collection internalValue = new ArrayList( collection.size() ); > type = null; > for ( Iterator ci = collection.iterator(); ci.hasNext(); ) > { > Object el = ci.next(); > if ( el == null ) > { > throw new IllegalArgumentException( "Collection must > not contain null elements" ); > } > > > thanks > david jencks -- Carsten Ziegeler Adobe Research Switzerland [email protected]
