Skip to content

Commit 4fd45fe

Browse files
author
Daniel Bustamante Ospina
committed
Fix code for CI/CD Env
1 parent 287611a commit 4fd45fe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

async/async-commons-starter/src/main/java/org/reactivecommons/async/impl/config/RabbitProperties.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.time.temporal.ChronoUnit;
1010
import java.util.ArrayList;
1111
import java.util.List;
12+
import java.util.Optional;
1213

1314
@ConfigurationProperties(prefix = "spring.rabbitmq")
1415
public class RabbitProperties {
@@ -923,12 +924,15 @@ private String trimPrefix(String input) {
923924
private String parseUsernameAndPassword(String input) {
924925
if (input.contains("@")) {
925926
String[] split = StringUtils.split(input, "@");
927+
if (split == null) return input;
926928
String creds = split[0];
927929
input = split[1];
928930
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+
}
932936
}
933937
}
934938
return input;

0 commit comments

Comments
 (0)