Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopocarlini committed Jun 13, 2024
1 parent 95ca89c commit ad9cf68
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public CreditorInstitutionDetail convert(MappingContext<PaStazionePa, CreditorIn
deNull(stazione.getProtocollo()).toLowerCase(),
deNull(stazione.getIp()),
deNull(stazione.getPorta()),
startWith("/", deNull(stazione.getServizio()))
addPrefixIfAbsent("/", deNull(stazione.getServizio()))
);
builder.endpointRT(endpointRT);
}
Expand All @@ -51,8 +51,8 @@ public CreditorInstitutionDetail convert(MappingContext<PaStazionePa, CreditorIn
deNull(stazione.getRedirectProtocollo().toLowerCase()),
deNull(stazione.getRedirectIp()),
deNull(stazione.getRedirectPorta()),
startWith("/", deNull(stazione.getRedirectPath())),
startWith("?", deNull(stazione.getRedirectQueryString()))
addPrefixIfAbsent("/", deNull(stazione.getRedirectPath())),
addPrefixIfAbsent("?", deNull(stazione.getRedirectQueryString()))
);
builder.endpointRedirect(endpointRedirect);
}
Expand All @@ -62,7 +62,7 @@ public CreditorInstitutionDetail convert(MappingContext<PaStazionePa, CreditorIn
deNull(stazione.getProtocollo4Mod()).toLowerCase(),
deNull(stazione.getIp4Mod()),
deNull(stazione.getPorta4Mod()),
startWith("/", deNull(stazione.getServizio4Mod()))
addPrefixIfAbsent("/", deNull(stazione.getServizio4Mod()))
);
builder.endpointMU(endpointMU);
}
Expand All @@ -72,7 +72,7 @@ public CreditorInstitutionDetail convert(MappingContext<PaStazionePa, CreditorIn
return builder.build();
}

private String startWith(String prefix, String s) {
private String addPrefixIfAbsent(String prefix, String s) {
if (!s.startsWith(prefix)) {
return prefix + s;
}
Expand Down

0 comments on commit ad9cf68

Please sign in to comment.