Skip to content

Commit 9a7db22

Browse files
raviuPascalPensa
andauthored
Update src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt
Shadowing of local variables should generally be avoided Co-authored-by: PascalPensa <88730686+PascalPensa@users.noreply.github.com>
1 parent ffcd50e commit 9a7db22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ open class OpenApiGeneratorTask : DefaultTask() {
7777
statusCode < MAX_HTTP_STATUS_CODE
7878
}
7979
logger.info("Generating OpenApi Docs..")
80-
val url = URL(url)
81-
val connection: HttpURLConnection = url.openConnection() as HttpURLConnection
80+
val connection: HttpURLConnection = URL(url).openConnection() as HttpURLConnection
8281
connection.requestMethod = "GET"
8382
connection.connect()
8483

0 commit comments

Comments
 (0)