From b0400647a97b7399d67d6df5ca78197f07a9af20 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 16 Jul 2022 01:17:15 +0000 Subject: [PATCH] java 17 compile issues git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902761 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/hemf/record/emfplus/HemfPlusFont.java | 2 +- .../main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java | 1 + .../main/java/org/apache/poi/hssf/eventmodel/ERFListener.java | 2 ++ poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java | 1 + .../main/java/org/apache/poi/hssf/model/InternalWorkbook.java | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusFont.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusFont.java index 857a8e93f5..a216d8623b 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusFont.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusFont.java @@ -102,7 +102,7 @@ public class HemfPlusFont { // A string of Length Unicode characters that contains the name of the font family. family = StringUtil.readUnicodeLE(leis, len); - size += len*LittleEndianConsts.SHORT_SIZE; + size += (long) len * LittleEndianConsts.SHORT_SIZE; return size; } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java index bab2df281d..fa4cf6c795 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java @@ -54,6 +54,7 @@ import org.apache.poi.hslf.exceptions.HSLFException; import org.apache.poi.hslf.model.HeadersFooters; import org.apache.poi.hslf.model.MovieShape; import org.apache.poi.hslf.record.*; +import org.apache.poi.hslf.record.Record; import org.apache.poi.hslf.record.SlideListWithText.SlideAtomsSet; import org.apache.poi.poifs.crypt.EncryptionInfo; import org.apache.poi.poifs.filesystem.DirectoryNode; diff --git a/poi/src/main/java/org/apache/poi/hssf/eventmodel/ERFListener.java b/poi/src/main/java/org/apache/poi/hssf/eventmodel/ERFListener.java index 2bb3989f8d..1924b476ba 100644 --- a/poi/src/main/java/org/apache/poi/hssf/eventmodel/ERFListener.java +++ b/poi/src/main/java/org/apache/poi/hssf/eventmodel/ERFListener.java @@ -17,6 +17,8 @@ package org.apache.poi.hssf.eventmodel; +import org.apache.poi.hssf.record.Record; + /** * An ERFListener is registered with the EventRecordFactory. * An ERFListener listens for Records coming from the stream diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java index 41e1099ba2..8deeec15a3 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java @@ -25,6 +25,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.SimpleMessage; import org.apache.poi.hssf.record.*; +import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.aggregates.ChartSubstreamRecordAggregate; import org.apache.poi.hssf.record.aggregates.ColumnInfoRecordsAggregate; import org.apache.poi.hssf.record.aggregates.ConditionalFormattingTable; diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java index ca1e7f8ec5..82a3838414 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java @@ -39,6 +39,7 @@ import org.apache.poi.ddf.EscherSpRecord; import org.apache.poi.ddf.EscherSplitMenuColorsRecord; import org.apache.poi.hssf.extractor.OldExcelExtractor; import org.apache.poi.hssf.record.*; +import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.common.UnicodeString; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.util.HSSFColor.HSSFColorPredefined;