@ -102,9 +102,7 @@ public class AllowlistPersistor {
Collectors . toMap (
Collectors . toMap (
o - > o . getKey ( ) ,
o - > o . getKey ( ) ,
o - >
o - >
o . getValue ( )
o . getValue ( ) . toList ( ) . parallelStream ( )
. toList ( )
. parallelStream ( )
. map ( Object : : toString )
. map ( Object : : toString )
. collect ( Collectors . toList ( ) ) ) ) ;
. collect ( Collectors . toList ( ) ) ) ) ;
}
}
@ -112,9 +110,7 @@ public class AllowlistPersistor {
@VisibleForTesting
@VisibleForTesting
void removeExistingConfigItem ( final ALLOWLIST_TYPE allowlistType ) throws IOException {
void removeExistingConfigItem ( final ALLOWLIST_TYPE allowlistType ) throws IOException {
List < String > otherConfigItems =
List < String > otherConfigItems =
existingConfigItems ( configurationFile . toPath ( ) )
existingConfigItems ( configurationFile . toPath ( ) ) . entrySet ( ) . parallelStream ( )
. entrySet ( )
. parallelStream ( )
. filter ( listType - > ! listType . getKey ( ) . equals ( allowlistType ) )
. filter ( listType - > ! listType . getKey ( ) . equals ( allowlistType ) )
. map ( keyVal - > valueListToTomlArray ( keyVal . getKey ( ) , keyVal . getValue ( ) ) )
. map ( keyVal - > valueListToTomlArray ( keyVal . getKey ( ) , keyVal . getValue ( ) ) )
. collect ( Collectors . toList ( ) ) ;
. collect ( Collectors . toList ( ) ) ;
@ -153,8 +149,7 @@ public class AllowlistPersistor {
return String . format (
return String . format (
"%s=[%s]" ,
"%s=[%s]" ,
allowlistType . getTomlKey ( ) ,
allowlistType . getTomlKey ( ) ,
allowlistValues
allowlistValues . parallelStream ( )
. parallelStream ( )
. map ( uri - > String . format ( "\"%s\"" , uri ) )
. map ( uri - > String . format ( "\"%s\"" , uri ) )
. collect ( Collectors . joining ( "," ) ) ) ;
. collect ( Collectors . joining ( "," ) ) ) ;
}
}