@ -195,7 +195,7 @@ public final class ConfigurationPropertyName
if ( elementValue = = null ) {
if ( elementValue = = null ) {
return this ;
return this ;
}
}
Elements additionalElements = elements Of ( elementValue ) ;
Elements additionalElements = probablySingl eE lementOf( elementValue ) ;
return new ConfigurationPropertyName ( this . elements . append ( additionalElements ) ) ;
return new ConfigurationPropertyName ( this . elements . append ( additionalElements ) ) ;
}
}
@ -424,11 +424,16 @@ public final class ConfigurationPropertyName
return ( elements ! = null ) ? new ConfigurationPropertyName ( elements ) : null ;
return ( elements ! = null ) ? new ConfigurationPropertyName ( elements ) : null ;
}
}
private static Elements elements Of ( CharSequence name ) {
private static Elements probablySingl eE lementOf( CharSequence name ) {
return elementsOf ( name , false ) ;
return elementsOf ( name , false , 1 ) ;
}
}
private static Elements elementsOf ( CharSequence name , boolean returnNullIfInvalid ) {
private static Elements elementsOf ( CharSequence name , boolean returnNullIfInvalid ) {
return elementsOf ( name , returnNullIfInvalid , ElementsParser . DEFAULT_CAPACITY ) ;
}
private static Elements elementsOf ( CharSequence name , boolean returnNullIfInvalid ,
int parserCapacity ) {
if ( name = = null ) {
if ( name = = null ) {
Assert . isTrue ( returnNullIfInvalid , "Name must not be null" ) ;
Assert . isTrue ( returnNullIfInvalid , "Name must not be null" ) ;
return null ;
return null ;
@ -443,7 +448,7 @@ public final class ConfigurationPropertyName
throw new InvalidConfigurationPropertyNameException ( name ,
throw new InvalidConfigurationPropertyNameException ( name ,
Collections . singletonList ( '.' ) ) ;
Collections . singletonList ( '.' ) ) ;
}
}
Elements elements = new ElementsParser ( name , '.' ) . parse ( ) ;
Elements elements = new ElementsParser ( name , '.' , parserCapacity ) . parse ( ) ;
for ( int i = 0 ; i < elements . getSize ( ) ; i + + ) {
for ( int i = 0 ; i < elements . getSize ( ) ; i + + ) {
if ( elements . getType ( i ) = = ElementType . NON_UNIFORM ) {
if ( elements . getType ( i ) = = ElementType . NON_UNIFORM ) {
if ( returnNullIfInvalid ) {
if ( returnNullIfInvalid ) {