@@ -93,27 +93,26 @@ public void createSession() {
93
93
// Grab the first "page" type, and glom on to that.
94
94
// TODO: Find out which one might be the current one
95
95
TargetID targetId = infos .stream ()
96
- .filter (info -> "page" .equals (info .getType ()))
97
- .map (TargetInfo ::getTargetId )
98
- .findAny ()
99
- .orElseThrow (() -> new DevToolsException ("Unable to find target id of a page" ));
96
+ .filter (info -> "page" .equals (info .getType ()))
97
+ .map (TargetInfo ::getTargetId )
98
+ .findAny ()
99
+ .orElseThrow (() -> new DevToolsException ("Unable to find target id of a page" ));
100
100
101
101
// Start the session.
102
- cdpSession =
103
- connection
104
- .sendAndWait (cdpSession , getDomains ().target ().attachToTarget (targetId ), timeout );
102
+ cdpSession = connection
103
+ .sendAndWait (cdpSession , getDomains ().target ().attachToTarget (targetId ), timeout );
105
104
106
105
try {
107
106
// We can do all of these in parallel, and we don't care about the result.
108
107
CompletableFuture .allOf (
109
- // Set auto-attach to true and run for the hills.
110
- connection .send (cdpSession , getDomains ().target ().setAutoAttach ()),
111
- // Clear the existing logs
112
- connection .send (cdpSession , getDomains ().log ().clear ())
113
- .exceptionally (t -> {
114
- t .printStackTrace ();
115
- return null ;
116
- })
108
+ // Set auto-attach to true and run for the hills.
109
+ connection .send (cdpSession , getDomains ().target ().setAutoAttach ()),
110
+ // Clear the existing logs
111
+ connection .send (cdpSession , getDomains ().log ().clear ())
112
+ .exceptionally (t -> {
113
+ t .printStackTrace ();
114
+ return null ;
115
+ })
117
116
).get (timeout .toMillis (), MILLISECONDS );
118
117
} catch (InterruptedException e ) {
119
118
Thread .currentThread ().interrupt ();
0 commit comments