}
// walk through all regular bridges and if multiple match
// raise an exception containing the conflicting bridges
StringBuilder multipleMatchError = null;
BridgeProvider initialMatchingBridgeProvider = null;
for ( BridgeProvider provider : regularProviders ) {
FieldBridge createdBridge = getFieldBridgeFromBridgeProvider(
provider,
context,
containerType
);
if ( createdBridge != null ) {
// oops we found a duplicate
if ( bridge != null ) {
// first duplicate, add the initial bridge
if ( multipleMatchError == null ) {
multipleMatchError = new StringBuilder( "\n" )
.append( "FieldBridge: " )
.append( bridge )
.append( " - BridgeProvider: " )
.append( initialMatchingBridgeProvider.getClass() );
}
multipleMatchError
.append( "\n" )
.append( "FieldBridge: ")
.append( createdBridge )