Skip to content

Commit

Permalink
remove unnecessary hashmap used when building comments table
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Jul 11, 2024
1 parent 1a59ef8 commit d95737e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,21 +269,17 @@ public StreamingSheet getSheet(final String name) throws MissingSheetException,

private StreamingSheet createSheet(final int idx) throws MissingSheetException {
final OoxmlReader.SheetData sheetData = ooxmlReader.getSheetDataAt(idx);
final Map<PackagePart, Comments> sheetComments = new HashMap<>();
if (builder.readShapes()) {
shapeMap.put(sheetData.getSheetName(), sheetData.getShapes());
}
final PackagePart part = sheetData.getSheetPart();
if (part == null) {
throw new MissingSheetException("Sheet at index " + idx + " is missing");
}
if (builder.readComments()) {
sheetComments.put(part, sheetData.getComments());
}
return new StreamingSheet(
sheetProperties.get(idx).get("name"),
new StreamingSheetReader(this, part, sst, styles,
sheetComments.get(part), use1904Dates, builder.getRowCacheSize()));
sheetData.getComments(), use1904Dates, builder.getRowCacheSize()));
}

private void lookupSheetNames(Document workbookDoc) {
Expand Down

0 comments on commit d95737e

Please sign in to comment.