Skip to content

Commit

Permalink
Fixed detekt warning
Browse files Browse the repository at this point in the history
  • Loading branch information
baldm committed May 3, 2024
1 parent 1652405 commit 6ea7f57
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fun populateEventFromJson(eventJson: String): BaseGithubContext {
}

private fun populateOnJsonPush(eventJson: String): BaseGithubContext? {
@Suppress("SwallowedException")
return try {
val event = JsonUtil.instance.decodeFromString<GithubPushContext.Event>(eventJson)
return BaseGithubContext(
Expand All @@ -58,6 +59,7 @@ private fun populateOnJsonPush(eventJson: String): BaseGithubContext? {
}

private fun populateOnJsonOpened(eventJson: String): BaseGithubContext? {
@Suppress("SwallowedException")
return try {
val event = JsonUtil.instance.decodeFromString<GithubOpenedContext>(eventJson)
return BaseGithubContext(
Expand All @@ -71,6 +73,7 @@ private fun populateOnJsonOpened(eventJson: String): BaseGithubContext? {
}

private fun populateOnJsonCreated(eventJson: String): BaseGithubContext? {
@Suppress("SwallowedException")
return try {
val event = JsonUtil.instance.decodeFromString<GithubCreatedContext>(eventJson)
return BaseGithubContext(
Expand Down

0 comments on commit 6ea7f57

Please sign in to comment.