Skip to content

Commit 9784f49

Browse files
committed
fix async class
1 parent fdf0430 commit 9784f49

File tree

1 file changed

+3
-4
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/flareChat

1 file changed

+3
-4
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/flareChat/ChatAsyncResultManager.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import java.util.concurrent.TimeoutException
1616
* between partial results and final results during cancellation.
1717
*/
1818
@Service(Service.Level.PROJECT)
19-
class ChatAsyncResultManager() {
19+
class ChatAsyncResultManager {
2020
private val results = ConcurrentHashMap<String, CompletableFuture<Any>>()
2121
private val completedResults = ConcurrentHashMap<String, Any>()
2222
private val timeout = 30L
@@ -45,9 +45,8 @@ class ChatAsyncResultManager() {
4545
completedResults[requestId] = result
4646
}
4747

48-
fun getResult(requestId: String): Any? {
49-
return getResult(requestId, timeout, timeUnit)
50-
}
48+
fun getResult(requestId: String): Any? =
49+
getResult(requestId, timeout, timeUnit)
5150

5251
private fun getResult(requestId: String, timeout: Long, unit: TimeUnit): Any? {
5352
val completedResult = completedResults[requestId]

0 commit comments

Comments
 (0)