File tree 1 file changed +7
-3
lines changed
async/async-commons-starter/src/main/java/org/reactivecommons/async/impl/config
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 9
9
import java .time .temporal .ChronoUnit ;
10
10
import java .util .ArrayList ;
11
11
import java .util .List ;
12
+ import java .util .Optional ;
12
13
13
14
@ ConfigurationProperties (prefix = "spring.rabbitmq" )
14
15
public class RabbitProperties {
@@ -923,12 +924,15 @@ private String trimPrefix(String input) {
923
924
private String parseUsernameAndPassword (String input ) {
924
925
if (input .contains ("@" )) {
925
926
String [] split = StringUtils .split (input , "@" );
927
+ if (split == null ) return input ;
926
928
String creds = split [0 ];
927
929
input = split [1 ];
928
930
split = StringUtils .split (creds , ":" );
929
- this .username = split [0 ];
930
- if (split .length > 0 ) {
931
- this .password = split [1 ];
931
+ if (split != null ) {
932
+ this .username = split [0 ];
933
+ if (split .length > 1 ) {
934
+ this .password = split [1 ];
935
+ }
932
936
}
933
937
}
934
938
return input ;
You can’t perform that action at this time.
0 commit comments