Skip to content

Commit

Permalink
Fix checkstyle violation
Browse files Browse the repository at this point in the history
  • Loading branch information
RohanNagar committed Sep 8, 2021
1 parent 21e1a66 commit 6f2099a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/sanctionco/jmail/JMail.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ private static Optional<Email> internalTryParse(String email) {
String ip = ipDomain.substring(1, ipDomain.length() - 1);
Optional<String> validatedIp = ip.startsWith(IPV6_PREFIX)
// If it starts with the IPv6 prefix, validate with IPv6
? InternetProtocolAddress.validateIpv6(ip.substring(IPV6_PREFIX.length())).map(s -> IPV6_PREFIX + s)
? InternetProtocolAddress.validateIpv6(ip.substring(IPV6_PREFIX.length()))
.map(s -> IPV6_PREFIX + s)
// Otherwise, it must be IPv4
: InternetProtocolAddress.validateIpv4(ip);

Expand Down

0 comments on commit 6f2099a

Please sign in to comment.