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 2525import java .util .HashMap ;
2626import java .util .List ;
2727import java .util .Map ;
28- import java .util .Map .Entry ;
29- import java .util .Optional ;
3028import java .util .logging .Logger ;
29+ import java .util .stream .Collectors ;
3130
3231import org .utplsql .sqldev .dal .RealtimeReporterDao ;
3332import org .utplsql .sqldev .dal .UtplsqlDao ;
@@ -99,11 +98,10 @@ private void setDefaultSchema() {
9998 owners .put (obj [0 ], count );
10099 }
101100 }
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 );
107105 }
108106 }
109107
You can’t perform that action at this time.
0 commit comments