File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
agent/update/src/main/java/me/hsgamer/topper/agent/update Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,14 @@ public void run() {
3737 break ;
3838 }
3939 DataEntry <K , V > entry = holder .getOrCreateEntry (k );
40- updateFunction .apply (k ). whenComplete (( optional , throwable ) -> {
41- if ( throwable != null ) {
42- logger . log ( Level . WARNING , "An error occurred while updating the entry: " + k , throwable );
43- } else {
44- optional . ifPresent ( entry :: setValue );
45- }
46- updateQueue .add (k );
47- });
40+ updateFunction .apply (k )
41+ . thenAcceptAsync ( optional -> optional . ifPresent ( entry :: setValue ))
42+ . whenComplete (( v , throwable ) -> {
43+ if ( throwable != null ) {
44+ logger . log ( Level . WARNING , "An error occurred while updating the entry: " + k , throwable );
45+ }
46+ updateQueue .add (k );
47+ });
4848 }
4949 }
5050
You can’t perform that action at this time.
0 commit comments