Skip to content

Commit 339bbbd

Browse files
authored
Lax array converter (#205)
Restore ability to configure array from collections. Fixes #204
1 parent e2f8380 commit 339bbbd

File tree

1 file changed

+3
-1
lines changed
  • org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/composite

1 file changed

+3
-1
lines changed

org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ArrayConverter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public Object fromConfiguration( final ConverterLookup lookup, final PlexusConfi
4949
final ConfigurationListener listener )
5050
throws ComponentConfigurationException
5151
{
52-
final Object value = fromExpression( configuration, evaluator, type, false );
52+
// Do not pass `type` here: it offers clear passage from collections to arrays and other way around
53+
// See https://issues.apache.org/jira/browse/MNG-5012
54+
final Object value = fromExpression( configuration, evaluator, null, false );
5355
if ( type.isInstance( value ) )
5456
{
5557
return value;

0 commit comments

Comments
 (0)