File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
java/client/src/org/openqa/selenium/logging Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 18
18
package org .openqa .selenium .logging ;
19
19
20
20
import com .google .common .collect .ImmutableSet ;
21
- import com .google .common .collect .Lists ;
22
21
22
+ import java .util .Collections ;
23
23
import java .util .List ;
24
24
import java .util .Set ;
25
25
26
26
/**
27
27
* LocalLogs instance that extracts entries from a logging handler.
28
28
*/
29
29
class HandlerBasedLocalLogs extends LocalLogs {
30
- final LoggingHandler loggingHandler ;
31
- final Set <String > logTypesToInclude ;
30
+ private final LoggingHandler loggingHandler ;
31
+ private final Set <String > logTypesToInclude ;
32
32
33
33
protected HandlerBasedLocalLogs (LoggingHandler loggingHandler , Set <String > logTypesToInclude ) {
34
34
super ();
@@ -42,11 +42,11 @@ public LogEntries get(String logType) {
42
42
loggingHandler .flush ();
43
43
return new LogEntries (entries );
44
44
}
45
- return new LogEntries (Lists .< LogEntry > newArrayList ());
45
+ return new LogEntries (Collections . emptyList ());
46
46
}
47
47
48
48
public Set <String > getAvailableLogTypes () {
49
- return ImmutableSet .< String > of (LogType .CLIENT );
49
+ return ImmutableSet .of (LogType .CLIENT );
50
50
}
51
51
52
52
public void addEntry (String logType , LogEntry entry ) {
Original file line number Diff line number Diff line change 17
17
18
18
package org .openqa .selenium .logging ;
19
19
20
- import com .google .common .collect .ImmutableList ;
21
- import com .google .common .collect .ImmutableSet ;
22
-
20
+ import java .util .Collections ;
23
21
import java .util .Set ;
24
22
25
23
/**
@@ -29,11 +27,11 @@ public abstract class LocalLogs implements Logs {
29
27
30
28
private static final LocalLogs NULL_LOGGER = new LocalLogs () {
31
29
public LogEntries get (String logType ) {
32
- return new LogEntries (ImmutableList .< LogEntry > of ());
30
+ return new LogEntries (Collections . emptyList ());
33
31
}
34
32
35
33
public Set <String > getAvailableLogTypes () {
36
- return ImmutableSet . of ();
34
+ return Collections . emptySet ();
37
35
}
38
36
39
37
public void addEntry (String logType , LogEntry entry ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public SessionLogs() {
40
40
41
41
public LogEntries getLogs (String logType ) {
42
42
if (logType == null || !logTypeToEntriesMap .containsKey (logType )) {
43
- return new LogEntries (Collections .< LogEntry > emptyList ());
43
+ return new LogEntries (Collections .emptyList ());
44
44
}
45
45
return logTypeToEntriesMap .get (logType );
46
46
}
You can’t perform that action at this time.
0 commit comments