LucenePDFDocument.java (pdfbox-2.0.23-src) | : | LucenePDFDocument.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 418 | skipping to change at line 418 | |||
addTextField(document, "Trapped", info.getTrapped()); | addTextField(document, "Trapped", info.getTrapped()); | |||
} | } | |||
int summarySize = Math.min(contents.length(), 500); | int summarySize = Math.min(contents.length(), 500); | |||
String summary = contents.substring(0, summarySize); | String summary = contents.substring(0, summarySize); | |||
// Add the summary as an UnIndexed field, so that it is stored and r eturned | // Add the summary as an UnIndexed field, so that it is stored and r eturned | |||
// with hit documents for display. | // with hit documents for display. | |||
addUnindexedField(document, "summary", summary); | addUnindexedField(document, "summary", summary); | |||
} | } | |||
catch (InvalidPasswordException e) | catch (InvalidPasswordException e) | |||
{ | { | |||
// they didn't suppply a password and the default of "" was wrong. | // they didn't supply a password and the default of "" was wrong. | |||
throw new IOException("Error: The document(" + documentLocation + ") is encrypted and will not be indexed.", e); | throw new IOException("Error: The document(" + documentLocation + ") is encrypted and will not be indexed.", e); | |||
} | } | |||
finally | finally | |||
{ | { | |||
if (pdfDocument != null) | if (pdfDocument != null) | |||
{ | { | |||
pdfDocument.close(); | pdfDocument.close(); | |||
} | } | |||
} | } | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |