@@ -57,7 +57,8 @@ public class UIDOperatorVerticle extends AbstractVerticle{
5757
5858 private static final int DEFAULT_MASTER_KEYSET_ID = 1 ;
5959 private static final int DEFAULT_KEYSET_ID = 99999 ;
60- private static DateTimeFormatter APIDateTimeFormatter = DateTimeFormatter .ISO_LOCAL_DATE_TIME .withZone (ZoneId .of ("UTC" ));
60+ private static final DateTimeFormatter API_DATE_TIME_FORMATTER = DateTimeFormatter .ISO_LOCAL_DATE_TIME .withZone (ZoneId .of ("UTC" ));
61+
6162 private final HealthComponent healthComponent = HealthManager .instance .registerComponent ("http-server" );
6263 private final JsonObject config ;
6364 private final AuthMiddleware auth ;
@@ -75,8 +76,7 @@ public class UIDOperatorVerticle extends AbstractVerticle{
7576 private Handler <RoutingContext > disableHandler = null ;
7677 private final boolean phoneSupport ;
7778 private final int tcfVendorId ;
78-
79- private IStatsCollectorQueue _statsCollectorQueue ;
79+ private final IStatsCollectorQueue _statsCollectorQueue ;
8080
8181 public UIDOperatorVerticle (JsonObject config ,
8282 IClientKeyProvider clientKeyProvider ,
@@ -99,7 +99,6 @@ public UIDOperatorVerticle(JsonObject config,
9999 this .v2PayloadHandler = new V2PayloadHandler (keyStore , config .getBoolean ("enable_v2_encryption" , true ), this .identityScope );
100100 this .phoneSupport = config .getBoolean ("enable_phone_support" , true );
101101 this .tcfVendorId = config .getInteger ("tcf_vendor_id" , 21 );
102-
103102 this ._statsCollectorQueue = statsCollectorQueue ;
104103 }
105104
@@ -303,10 +302,10 @@ public void handleKeysSharing(RoutingContext rc) {
303302 }
304303
305304 private List <EncryptionKey > getEncryptionKeys () {
306- final List <EncryptionKey > keyStore = this .keyStore .getSnapshot ().getActiveKeySet ()
307- .stream ().filter (k -> k .getSiteId () != Const .Data .RefreshKeySiteId )
305+ return this .keyStore .getSnapshot ().getActiveKeySet ()
306+ .stream ()
307+ .filter (k -> k .getSiteId () != Const .Data .RefreshKeySiteId )
308308 .collect (Collectors .toList ());
309- return keyStore ;
310309 }
311310
312311 private void handleHealthCheck (RoutingContext rc ) {
@@ -667,7 +666,7 @@ private void handleBucketsV1(RoutingContext rc) {
667666 o .put ("bucket_id" , e .getHashedId ());
668667 Instant lastUpdated = Instant .ofEpochMilli (e .getLastUpdated ());
669668
670- o .put ("last_updated" , APIDateTimeFormatter .format (lastUpdated ));
669+ o .put ("last_updated" , API_DATE_TIME_FORMATTER .format (lastUpdated ));
671670 resp .add (o );
672671 }
673672 ResponseUtil .Success (rc , resp );
@@ -698,7 +697,7 @@ private void handleBucketsV2(RoutingContext rc) {
698697 o .put ("bucket_id" , e .getHashedId ());
699698 Instant lastUpdated = Instant .ofEpochMilli (e .getLastUpdated ());
700699
701- o .put ("last_updated" , APIDateTimeFormatter .format (lastUpdated ));
700+ o .put ("last_updated" , API_DATE_TIME_FORMATTER .format (lastUpdated ));
702701 resp .add (o );
703702 }
704703 ResponseUtil .SuccessV2 (rc , resp );
@@ -1058,9 +1057,7 @@ private void handleIdentityMapBatch(RoutingContext rc) {
10581057
10591058 final Instant now = Instant .now ();
10601059 final JsonArray mapped = new JsonArray ();
1061- final int count = inputList .length ;
1062- for (int i = 0 ; i < count ; ++i ) {
1063- final InputUtil .InputVal input = inputList [i ];
1060+ for (final InputUtil .InputVal input : inputList ) {
10641061 if (input != null && input .isValid ()) {
10651062 final MappedIdentity mappedIdentity = this .idService .map (input .toUserIdentity (this .identityScope , 0 , now ), now );
10661063 final JsonObject resp = new JsonObject ();
@@ -1245,8 +1242,7 @@ private JsonObject toJsonV1(IdentityTokens t) {
12451242
12461243 private JsonArray toJson (List <EncryptionKey > keys , ClientKey clientKey , IKeysAclSnapshot acls ) {
12471244 final JsonArray a = new JsonArray ();
1248- for (int i = 0 ; i < keys .size (); ++i ) {
1249- final EncryptionKey k = keys .get (i );
1245+ for (final EncryptionKey k : keys ) {
12501246 if (!acls .canClientAccessKey (clientKey , k )) {
12511247 continue ;
12521248 }
@@ -1295,7 +1291,7 @@ public static class ResponseStatus {
12951291 public static String InsufficientUserConsent = "insufficient_user_consent" ;
12961292 }
12971293
1298- public static enum UserConsentStatus {
1294+ public enum UserConsentStatus {
12991295 SUFFICIENT ,
13001296 INSUFFICIENT ,
13011297 INVALID ,
0 commit comments