File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
projects/RabbitMQ.Client/client/api Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -723,14 +723,15 @@ private List<AmqpTcpEndpoint> LocalEndpoints()
723723
724724 private static string EnsureClientProvidedNameLength ( string clientProvidedName )
725725 {
726- if ( clientProvidedName . Length > InternalConstants . DefaultRabbitMqMaxClientProvideNameLength )
726+ if ( clientProvidedName != null )
727727 {
728- return clientProvidedName . Substring ( 0 , InternalConstants . DefaultRabbitMqMaxClientProvideNameLength ) ;
729- }
730- else
731- {
732- return clientProvidedName ;
728+ if ( clientProvidedName . Length > InternalConstants . DefaultRabbitMqMaxClientProvideNameLength )
729+ {
730+ return clientProvidedName . Substring ( 0 , InternalConstants . DefaultRabbitMqMaxClientProvideNameLength ) ;
731+ }
733732 }
733+
734+ return clientProvidedName ;
734735 }
735736 }
736737}
You can’t perform that action at this time.
0 commit comments