File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
sqldev/src/main/java/org/utplsql/sqldev/coverage Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 25
25
import java .util .HashMap ;
26
26
import java .util .List ;
27
27
import java .util .Map ;
28
- import java .util .Map .Entry ;
29
- import java .util .Optional ;
30
28
import java .util .logging .Logger ;
29
+ import java .util .stream .Collectors ;
31
30
32
31
import org .utplsql .sqldev .dal .RealtimeReporterDao ;
33
32
import org .utplsql .sqldev .dal .UtplsqlDao ;
@@ -99,11 +98,10 @@ private void setDefaultSchema() {
99
98
owners .put (obj [0 ], count );
100
99
}
101
100
}
102
- Optional <Entry <String , Integer >> top = owners .entrySet ().stream ()
103
- .sorted (Map .Entry .<String , Integer >comparingByValue ().reversed ()).findFirst ();
104
- if (top .isPresent ()) {
105
- schemas = top .get ().getKey ();
106
- }
101
+ List <String > sortedOwners = owners .entrySet ().stream ()
102
+ .sorted (Map .Entry .<String , Integer >comparingByValue ().reversed ()).map (Map .Entry ::getKey )
103
+ .collect (Collectors .toList ());
104
+ schemas = String .join (", " , sortedOwners );
107
105
}
108
106
}
109
107
You can’t perform that action at this time.
0 commit comments