File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/org/keepassxc Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 16
16
import java .nio .file .Path ;
17
17
import java .nio .file .Paths ;
18
18
import java .nio .file .StandardOpenOption ;
19
+ import java .util .concurrent .ExecutionException ;
19
20
import java .util .concurrent .Future ;
20
21
21
22
public class WindowsConnection extends Connection {
@@ -65,8 +66,11 @@ protected void sendCleartextMessage(String msg) throws IOException {
65
66
protected JSONObject getCleartextResponse () {
66
67
var raw = new StringBuilder ();
67
68
long position = 0 ;
68
- Future <Integer > operation = pipe .read (buffer , position );
69
- while (!operation .isDone ());
69
+ try {
70
+ pipe .read (buffer , position ).get ();
71
+ } catch (InterruptedException | ExecutionException e ) {
72
+ log .error (e .toString (), e .getCause ());
73
+ }
70
74
buffer .flip ();
71
75
charsetDecoder .decode (buffer , charBuffer , true );
72
76
charBuffer .flip ();
You can’t perform that action at this time.
0 commit comments