Skip to content

Commit ce834c8

Browse files
committed
fix detekt issues
1 parent 098bb78 commit ce834c8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/NotificationPollingService.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ private const val MAX_RETRIES = 3
3131
private const val RETRY_DELAY_MS = 1000L
3232

3333
object NotificationFileValidator : RemoteResolveParser {
34-
override fun canBeParsed(data: InputStream): Boolean {
35-
return try {
34+
override fun canBeParsed(data: InputStream): Boolean =
35+
try {
3636
NotificationMapperUtil.mapper.readValue<NotificationsList>(data)
3737
true
3838
} catch (e: Exception) {
3939
false
4040
}
41-
}
4241
}
4342

4443
@State(name = "NotificationETagState", storages = [Storage("aws.xml", roamingType = RoamingType.DISABLED)])
@@ -96,7 +95,7 @@ class NotificationPollingService : Disposable {
9695
}
9796
return false
9897
}
99-
val resolvedPath = resourceResolver.get()
98+
resourceResolver.get()
10099
.resolve(notificationsResource)
101100
.toCompletableFuture()
102101
.get()

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class ProcessNotificationsBase {
1919

2020
init {
2121
NotificationPollingService.getInstance().addObserver {
22-
val list = getNotificationsFromFile()
22+
getNotificationsFromFile()
2323
}
2424
}
2525

26-
fun getNotificationsFromFile(): NotificationsList? {
26+
private fun getNotificationsFromFile(): NotificationsList? {
2727
val path = Paths.get(PathManager.getSystemPath(), NOTIFICATIONS_PATH)
2828
val content = path.inputStream().bufferedReader().use { it.readText() }
2929
if (content.isEmpty()) {

0 commit comments

Comments
 (0)