aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-05-23 20:18:17 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-05-24 01:05:42 +0900
commita91561aa58db1c43092c1caecc051a11fa5391c7 (patch)
tree20864cd0644414688af87d59638b7a8ac59c2895 /tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
parente782f1f4154690da356fac6939ded66b5f66864d (diff)
downloadlatinime-a91561aa58db1c43092c1caecc051a11fa5391c7.tar.gz
latinime-a91561aa58db1c43092c1caecc051a11fa5391c7.tar.xz
latinime-a91561aa58db1c43092c1caecc051a11fa5391c7.zip
Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
index 7091c119e..65b84d5f7 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
@@ -20,7 +20,6 @@ import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.BinaryDictionary;
import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding;
import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer;
-import com.android.inputmethod.latin.utils.CollectionUtils;
import java.io.File;
import java.io.FileNotFoundException;
@@ -34,8 +33,6 @@ import java.util.Arrays;
// TODO: Separate logics that are used only for testing.
@UsedForTesting
public class Ver2DictDecoder extends AbstractDictDecoder {
- private static final String TAG = Ver2DictDecoder.class.getSimpleName();
-
/**
* A utility class for reading a PtNode.
*/
@@ -233,7 +230,7 @@ public class Ver2DictDecoder extends AbstractDictDecoder {
final ArrayList<WeightedString> shortcutTargets;
if (0 != (flags & FormatSpec.FLAG_HAS_SHORTCUT_TARGETS)) {
// readShortcut will add shortcuts to shortcutTargets.
- shortcutTargets = new ArrayList<WeightedString>();
+ shortcutTargets = new ArrayList<>();
addressPointer += PtNodeReader.readShortcut(mDictBuffer, shortcutTargets);
} else {
shortcutTargets = null;
@@ -241,7 +238,7 @@ public class Ver2DictDecoder extends AbstractDictDecoder {
final ArrayList<PendingAttribute> bigrams;
if (0 != (flags & FormatSpec.FLAG_HAS_BIGRAMS)) {
- bigrams = new ArrayList<PendingAttribute>();
+ bigrams = new ArrayList<>();
addressPointer += PtNodeReader.readBigramAddresses(mDictBuffer, bigrams,
addressPointer);
if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
@@ -267,7 +264,7 @@ public class Ver2DictDecoder extends AbstractDictDecoder {
final FusionDictionary fusionDict =
new FusionDictionary(new FusionDictionary.PtNodeArray(), header.mDictionaryOptions);
int token = 0;
- final ArrayList<WordProperty> wordProperties = CollectionUtils.newArrayList();
+ final ArrayList<WordProperty> wordProperties = new ArrayList<>();
do {
final BinaryDictionary.GetNextWordPropertyResult result =
binaryDictionary.getNextWordProperty(token);