Skip to content

Commit ffcd50e

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 28ae745 commit ffcd50e

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
@@ -69,8 +69,7 @@ open class OpenApiGeneratorTask : DefaultTask() {
6969
waitTimeInSeconds.get().toLong(),
7070
SECONDS
7171
) until {
72-
val url = URL(url)
73-
val connection: HttpURLConnection = url.openConnection() as HttpURLConnection
72+
val connection: HttpURLConnection = URL(url).openConnection() as HttpURLConnection
7473
connection.requestMethod = "GET"
7574
connection.connect()
7675
val statusCode = connection.responseCode

0 commit comments

Comments
 (0)