Replace the incompatible new interface method endSheet() with a Java 8 default method so existing implementations do not need to be adjusted. Also use this for headerFooter() and remove the empty implementations that are now obsolete.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1809635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a2ce09761
commit
61a281e790
@ -135,15 +135,6 @@ public class XLSX2CSV {
|
||||
output.append('"');
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void headerFooter(String text, boolean isHeader, String tagName) {
|
||||
// Skip, no headers or footers in CSV
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endSheet() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,10 +64,6 @@ public class HybridStreaming {
|
||||
public void startRow(int rowNum) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void headerFooter(String text, boolean isHeader, String tagName) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endRow(int rowNum) {
|
||||
}
|
||||
@ -75,12 +71,6 @@ public class HybridStreaming {
|
||||
@Override
|
||||
public void cell(String cellReference, String formattedValue, XSSFComment comment) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endSheet() {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -515,9 +515,9 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
|
||||
public void cell(String cellReference, String formattedValue, XSSFComment comment);
|
||||
|
||||
/** A header or footer has been encountered */
|
||||
public void headerFooter(String text, boolean isHeader, String tagName);
|
||||
public default void headerFooter(String text, boolean isHeader, String tagName) {}
|
||||
|
||||
/** Signal that the end of a sheet was been reached */
|
||||
public void endSheet();
|
||||
public default void endSheet() {}
|
||||
}
|
||||
}
|
||||
|
@ -342,10 +342,6 @@ public class XSSFEventBasedExcelExtractor extends POIXMLTextExtractor
|
||||
output.append('\n');
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endSheet() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cell(String cellRef, String formattedValue, XSSFComment comment) {
|
||||
if(firstCellOfRow) {
|
||||
|
Loading…
Reference in New Issue
Block a user