Bump org.apache.pdfbox to 3.0.4 and guard against empty unicode strings (#3271)
Fixes: #3265 * Bump org.apache.pdfbox to 3.0.4 * Guard against empty unicode strings Auto-cherry-pick to 1.0.x Signed-off-by: David Frizelle <david.frizelle@gmail.com> --------- Signed-off-by: David Frizelle <david.frizelle@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2023-2024 the original author or authors.
|
||||
* Copyright 2023-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -94,7 +94,7 @@ class CharacterFactory {
|
||||
|
||||
private char getCharacterFromTextPosition(final TextPosition textPosition) {
|
||||
String string = textPosition.getUnicode();
|
||||
char character = string.charAt(0);
|
||||
char character = !string.isEmpty() ? string.charAt(0) : '\0';
|
||||
return character;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user