Remove SetBuilder

Reviewed By: AaaChiuuu

Differential Revision: D5237184

fbshipit-source-id: dde09febd0d4a5a42a62c7c6fbda3e6713d26152
This commit is contained in:
Pieter De Baets 2017-06-14 16:43:16 -07:00 committed by Facebook Github Bot
parent 7464d5e1a2
commit 559805d0b0
2 changed files with 1 additions and 28 deletions

View File

@ -1,26 +0,0 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.react.common;
import java.util.HashSet;
/**
* Utility class for creating sets
*/
public class SetBuilder {
/**
* Creates an instance of {@code HashSet}
*/
public static <E> HashSet<E> newHashSet() {
return new HashSet<E>();
}
}

View File

@ -25,7 +25,6 @@ import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.common.SetBuilder;
import com.facebook.react.module.annotations.ReactModule;
import com.facebook.react.modules.common.ModuleDataCleaner;
@ -95,7 +94,7 @@ public final class AsyncStorageModule
}
String[] columns = {KEY_COLUMN, VALUE_COLUMN};
HashSet<String> keysRemaining = SetBuilder.newHashSet();
HashSet<String> keysRemaining = new HashSet<>();
WritableArray data = Arguments.createArray();
for (int keyStart = 0; keyStart < keys.size(); keyStart += MAX_SQL_KEYS) {
int keyCount = Math.min(keys.size() - keyStart, MAX_SQL_KEYS);