Skip to content

Commit 5317a98

Browse files
committed
chore: fix vcs tests
1 parent acce961 commit 5317a98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/src/main/kotlin/spp/probe/ProbeConfiguration.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,15 @@ object ProbeConfiguration {
230230
},
231231
getJsonObject("authentication")?.let {
232232
val clientId = it.getString("client_id")
233+
.takeIf { it != null && it.isNotBlank() }
233234
val clientSecret = it.getString("client_secret")
235+
.takeIf { it != null && it.isNotBlank() }
234236
val tenantId = it.getString("tenant_id")
237+
.takeIf { it != null && it.isNotBlank() }
235238
val environment = spp.getJsonObject("application")?.getString("environment")
239+
.takeIf { it != null && it.isNotBlank() }
236240
val version = spp.getJsonObject("application")?.getString("version")
241+
.takeIf { it != null && it.isNotBlank() }
237242
arrayOf("skywalking.agent.authentication", "$clientId:$clientSecret:$tenantId:$environment:$version")
238243
}
239244
).filterNotNull().toMutableSet()

0 commit comments

Comments
 (0)