diff --git a/modules/java/generator/gen_java.py b/modules/java/generator/gen_java.py index 1e084c70e..254298d8b 100755 --- a/modules/java/generator/gen_java.py +++ b/modules/java/generator/gen_java.py @@ -521,7 +521,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize public java.util.List getSupportedPreviewSizes() { String[] sizes_str = getSupportedPreviewSizes_0(nativeObj).split(","); - java.util.List sizes = new java.util.LinkedList(); + java.util.List sizes = new java.util.ArrayList(sizes_str.length); for (String str : sizes_str) { String[] wh = str.split("x");