From de6540e139851bb64dffea7db5d6a5917f079be2 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 1 Feb 2022 13:37:46 +0000 Subject: [PATCH] java 17 build issues (ambiguous ref to Record class) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897659 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/usermodel/HSSFWorkbook.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java index a6080ff833..b32b9c1151 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java @@ -367,7 +367,7 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { // it happens to be spelled. InputStream stream = directory.createDocumentInputStream(workbookName); - List records = RecordFactory.createRecords(stream); + List records = RecordFactory.createRecords(stream); workbook = InternalWorkbook.createWorkbook(records); setPropertiesFromWorkbook(workbook); @@ -457,10 +457,10 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { * @see SSTRecord */ - private void convertLabelRecords(List records, int offset) { + private void convertLabelRecords(List records, int offset) { LOGGER.atDebug().log("convertLabelRecords called"); for (int k = offset; k < records.size(); k++) { - Record rec = records.get(k); + org.apache.poi.hssf.record.Record rec = records.get(k); if (rec.getSid() == LabelRecord.sid) { LabelRecord oldrec = (LabelRecord) rec; @@ -1450,7 +1450,7 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { */ private static final class SheetRecordCollector implements RecordVisitor { - private final List _list; + private final List _list; private int _totalSize; public SheetRecordCollector() { @@ -1463,7 +1463,7 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { } @Override - public void visitRecord(Record r) { + public void visitRecord(org.apache.poi.hssf.record.Record r) { _list.add(r); _totalSize += r.getRecordSize(); @@ -1471,7 +1471,7 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { public int serialize(int offset, byte[] data) { int result = 0; - for (Record rec : _list) { + for (org.apache.poi.hssf.record.Record rec : _list) { result += rec.serialize(offset + result, data); } return result; @@ -2032,7 +2032,7 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { public List getAllPictures() { // The drawing group record always exists at the top level, so we won't need to do this recursively. List pictures = new ArrayList<>(); - for (Record r : workbook.getRecords()) { + for (RecordBase r : workbook.getRecords()) { if (r instanceof AbstractEscherHolderRecord) { ((AbstractEscherHolderRecord) r).decode(); List escherRecords = ((AbstractEscherHolderRecord) r).getEscherRecords(); -- 2.39.5