diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-07-21 03:26:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-07-21 03:26:06 +0000 |
commit | 2873eb7d839184063ea10a2fe4f83334b7386222 (patch) | |
tree | cb661122a89a271de494c0bb96839c63721aafba /apex | |
parent | 73ef335c0f0610e00eb990c7526c173b8729bd4e (diff) | |
parent | 830c6797cd2647198f885e4ad1f5eb095aa866a2 (diff) |
Merge "Allow GenericDocument accept a String property longer than 20_000." into sc-dev
Diffstat (limited to 'apex')
-rw-r--r-- | apex/appsearch/framework/java/external/android/app/appsearch/GenericDocument.java | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/apex/appsearch/framework/java/external/android/app/appsearch/GenericDocument.java b/apex/appsearch/framework/java/external/android/app/appsearch/GenericDocument.java index c905f95fe4c4..5801972fe81a 100644 --- a/apex/appsearch/framework/java/external/android/app/appsearch/GenericDocument.java +++ b/apex/appsearch/framework/java/external/android/app/appsearch/GenericDocument.java @@ -51,9 +51,6 @@ import java.util.Set; public class GenericDocument { private static final String TAG = "AppSearchGenericDocumen"; - /** The maximum {@link String#length} of a {@link String} field. */ - private static final int MAX_STRING_LENGTH = 20_000; - /** The maximum number of indexed properties a document can have. */ private static final int MAX_INDEXED_PROPERTIES = 16; @@ -1286,15 +1283,6 @@ public class GenericDocument { for (int i = 0; i < values.length; i++) { if (values[i] == null) { throw new IllegalArgumentException("The String at " + i + " is null."); - } else if (values[i].length() > MAX_STRING_LENGTH) { - throw new IllegalArgumentException( - "The String at " - + i - + " length is: " - + values[i].length() - + ", which exceeds length limit: " - + MAX_STRING_LENGTH - + "."); } } mProperties.putStringArray(name, values); |