code formatting

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1835674 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-07-11 21:32:55 +00:00
parent 8991d83868
commit ee1e389838
4 changed files with 26 additions and 34 deletions

View File

@ -141,14 +141,10 @@ public class SXSSFSheet implements Sheet
SXSSFRow newRow = new SXSSFRow(this); SXSSFRow newRow = new SXSSFRow(this);
_rows.put(rownum, newRow); _rows.put(rownum, newRow);
allFlushed = false; allFlushed = false;
if(_randomAccessWindowSize>=0&&_rows.size()>_randomAccessWindowSize) if(_randomAccessWindowSize >= 0 && _rows.size() > _randomAccessWindowSize) {
{ try {
try
{
flushRows(_randomAccessWindowSize); flushRows(_randomAccessWindowSize);
} } catch (IOException ioe) {
catch (IOException ioe)
{
throw new RuntimeException(ioe); throw new RuntimeException(ioe);
} }
} }
@ -167,11 +163,9 @@ public class SXSSFSheet implements Sheet
throw new IllegalArgumentException("Specified row does not belong to this sheet"); throw new IllegalArgumentException("Specified row does not belong to this sheet");
} }
for(Iterator<Map.Entry<Integer,SXSSFRow>> iter=_rows.entrySet().iterator();iter.hasNext();) for(Iterator<Map.Entry<Integer, SXSSFRow>> iter = _rows.entrySet().iterator(); iter.hasNext();) {
{
Map.Entry<Integer, SXSSFRow> entry = iter.next(); Map.Entry<Integer, SXSSFRow> entry = iter.next();
if(entry.getValue()==row) if(entry.getValue() == row) {
{
iter.remove(); iter.remove();
return; return;
} }
@ -208,8 +202,7 @@ public class SXSSFSheet implements Sheet
* @return the number of the first logical row on the sheet (0-based) * @return the number of the first logical row on the sheet (0-based)
*/ */
@Override @Override
public int getFirstRowNum() public int getFirstRowNum() {
{
if(_writer.getNumberOfFlushedRows() > 0) { if(_writer.getNumberOfFlushedRows() > 0) {
return _writer.getLowestIndexOfFlushedRows(); return _writer.getLowestIndexOfFlushedRows();
} }

View File

@ -691,8 +691,7 @@ public class SXSSFWorkbook implements Workbook {
*/ */
@Override @Override
@NotImplemented @NotImplemented
public Sheet cloneSheet(int sheetNum) public Sheet cloneSheet(int sheetNum) {
{
throw new RuntimeException("Not Implemented"); throw new RuntimeException("Not Implemented");
} }