Skip to content

Commit 550640c

Browse files
style: add braces to single-line conditionals per AGENT.md
Co-Authored-By: Matej Snuderl <ematej.snuderl@gmail.com>
1 parent 0e17f73 commit 550640c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/main/java/io/github/hectorvent/floci/services/s3/S3VirtualHostFilter.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ static String extractBucket(String host, String baseHostname) {
111111

112112
/** Extracts the hostname (without scheme or port) from a URL string. */
113113
static String extractHostnameFromUrl(String url) {
114-
if (url == null) return null;
114+
if (url == null) {
115+
return null;
116+
}
115117
try {
116118
URI uri = URI.create(url);
117119
return uri.getHost();
@@ -143,9 +145,13 @@ private static boolean isIpv4Address(String hostname) {
143145

144146
/** Returns true for *.s3.amazonaws.com and *.s3.<region>.amazonaws.com domains. */
145147
private static boolean isAwsS3Domain(String remainder) {
146-
if ("s3.amazonaws.com".equals(remainder)) return true;
148+
if ("s3.amazonaws.com".equals(remainder)) {
149+
return true;
150+
}
147151
// s3.<region>.amazonaws.com
148-
if (remainder.startsWith("s3.") && remainder.endsWith(".amazonaws.com")) return true;
152+
if (remainder.startsWith("s3.") && remainder.endsWith(".amazonaws.com")) {
153+
return true;
154+
}
149155
return false;
150156
}
151157
}

0 commit comments

Comments
 (0)