Skip to content

Commit 122032d

Browse files
committed
PDFBOX-5660: Sonar fix
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1924912 13f79535-47bb-0310-9956-ffa450edef68
1 parent 03f99dd commit 122032d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/src/main/java/org/apache/pdfbox/examples/util/PDFHighlighter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected void endPage( PDPage pdPage ) throws IOException
113113
// Traitement des listes à puces (caractères spéciaux)
114114
if (page.indexOf('a') != -1)
115115
{
116-
page = page.replaceAll("a[0-9]{1,3}", ".");
116+
page = page.replaceAll("a\\d{1,3}", ".");
117117
}
118118
for (String searchedWord : searchedWords)
119119
{

pdfbox/src/main/java/org/apache/pdfbox/cos/COSNumber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static COSNumber get( String number ) throws IOException
8484
// check if the given string could be a number at all
8585
String numberString = number.startsWith("+") || number.startsWith("-")
8686
? number.substring(1) : number;
87-
if (!numberString.matches("[0-9]*"))
87+
if (!numberString.matches("\\d*"))
8888
{
8989
throw new IOException("Not a number: " + number);
9090
}

0 commit comments

Comments
 (0)