set buffer for routeconverter to its default size of 1MB which should be sufficient to tell whether format is recognized

This commit is contained in:
Axel Uhl committed 2014-06-03 11:36:02 +02:00
1 parent 493b6d1e07
commit be010810f7
1 file changed
+2 -1
@@ -62,7 +62,8 @@ public abstract class BaseRouteConverterGPSFixImporterImpl extends BaseGPSFixImp
Method m = NavigationFormatParser.class.getDeclaredMethod("read", InputStream.class, Integer.TYPE,
CompactCalendar.class, List.class);
m.setAccessible(true);
ParserResult result = (ParserResult) m.invoke(parser, inputStream, 1024 * 1024 * 1024, null, supportedReadFormats);
ParserResult result = (ParserResult) m.invoke(parser, inputStream, /* read buffer size; 1MB should be
sufficient to tell whether the format is understood or not */ 1024 * 1024, null, supportedReadFormats);
if (result == null) {
throw new FormatNotSupportedException();
}