Skip to content
Snippets Groups Projects
Commit f78f37f8 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added truncated getErrors() to workaround Rosetta Issue...

- added truncated getErrors() to workaround Rosetta Issue https://support.proquest.com/500Do0000083LJkIAM,
- closes #8
parent 75f774e3
No related branches found
No related tags found
No related merge requests found
......@@ -248,7 +248,22 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
@Override
public final List<String> getErrors() {
return List.copyOf(this.validationLog);
List<String> truncated = new ArrayList<String>();
int chars=0;
/* workaround for Rosetta Issue https://support.proquest.com/500Do0000083LJkIAM
* truncate to ensure not more than 2000 chars used, to
*/
for (String e: validationLog) {
if ( (chars+ e.length()) < 1900 ) {
truncated.add( e );
chars+=e.length()+1; // +1 for line ending
} else {
truncated.add ("... (the full error is truncated, because Rosetta limits, see Rosetta log for detailed output)");
log.info("truncated errors in getError");
break;
}
}
return truncated;
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment