Author: fanningpj
Date: Wed Apr 9 21:30:50 2025
New Revision: 1924978
URL: http://svn.apache.org/viewvc?rev=1924978&view=rev
Log:
[bug-69646] check for null _fd instance in dispose call
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
Modified:
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java?rev=1924978&r1=1924977&r2=1924978&view=diff
==============================================================================
---
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
(original)
+++
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
Wed Apr 9 21:30:50 2025
@@ -29,6 +29,7 @@ import java.nio.charset.StandardCharsets
import org.apache.logging.log4j.Logger;
import org.apache.poi.logging.PoiLogManager;
import org.apache.poi.util.Beta;
+import org.apache.poi.util.Removal;
/**
* Unlike SheetDataWriter, this writer does not create a temporary file, it
writes data directly
@@ -40,6 +41,11 @@ public class StreamingSheetWriter extend
private static final Logger LOG =
PoiLogManager.getLogger(StreamingSheetWriter.class);
private boolean closed = false;
+ /**
+ * @throws IOException always thrown, use the constructor with an
OutputStream
+ * @deprecated use {@link #StreamingSheetWriter(OutputStream)}
+ */
+ @Removal(version = "6.0.0")
public StreamingSheetWriter() throws IOException {
throw new IllegalStateException("StreamingSheetWriter requires
OutputStream");
}
@@ -49,11 +55,17 @@ public class StreamingSheetWriter extend
LOG.atDebug().log("Preparing SXSSF sheet writer");
}
+ /**
+ * @throws IllegalStateException always thrown - not supported
+ */
@Override
public File createTempFile() throws IOException {
throw new IllegalStateException("Not supported with
StreamingSheetWriter");
}
+ /**
+ * @throws IllegalStateException always thrown - not supported
+ */
@Override
public Writer createWriter(File fd) throws IOException {
throw new IllegalStateException("Not supported with
StreamingSheetWriter");
@@ -75,6 +87,9 @@ public class StreamingSheetWriter extend
}
}
+ /**
+ * @throws IllegalStateException always thrown - not supported
+ */
@Override
public InputStream getWorksheetXMLInputStream() throws IOException {
throw new IllegalStateException("Not supported with
StreamingSheetWriter");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]