switch(idOffset - (pos - 6)) { // 6 for 3 shorts: sid, dataSize, idOffset
case 1:
out.writeByte(field_4_unknownByte == null ? 0x00 : field_4_unknownByte.intValue());
- pos ++;
+ pos++;
+ break;
case 0:
break;
default:
* precalculated value, for numerics we'll set its value. For other types we
* will change the cell to a numeric cell and set its value.
*/
+ @SuppressWarnings("fallthrough")
public void setCellValue(double value) {
if(Double.isInfinite(value)) {
// Excel does not support positive/negative infinities,
switch (_cellType) {
default:
setCellType(CELL_TYPE_NUMERIC, false, row, col, styleIndex);
+ // fall through
case CELL_TYPE_NUMERIC:
(( NumberRecord ) _record).setValue(value);
break;
* precalculated value, for booleans we'll set its value. For other types we
* will change the cell to a boolean cell and set its value.
*/
+ @SuppressWarnings("fallthrough")
public void setCellValue(boolean value) {
int row=_record.getRow();
short col=_record.getColumn();
switch (_cellType) {
default:
setCellType(CELL_TYPE_BOOLEAN, false, row, col, styleIndex);
+ // fall through
case CELL_TYPE_BOOLEAN:
(( BoolErrRecord ) _record).setValue(value);
break;
* its value. For other types we will change the cell to an error
* cell and set its value.
*/
+ @SuppressWarnings("fallthrough")
public void setCellErrorValue(byte errorCode) {
int row=_record.getRow();
short col=_record.getColumn();
switch (_cellType) {
default:
setCellType(CELL_TYPE_ERROR, false, row, col, styleIndex);
+ // fall through
case CELL_TYPE_ERROR:
(( BoolErrRecord ) _record).setValue(errorCode);
break;
* @see #PICTURE_TYPE_JPEG
* @see #PICTURE_TYPE_DIB
*/
+ @SuppressWarnings("fallthrough")
@Override
public int addPicture(byte[] pictureData, int format)
{
switch(args.length) {
case 3:
basis = evaluateIntArg(args[2], srcCellRow, srcCellCol);
+ // fall through
case 2:
break;
default:
}
}
+ @SuppressWarnings("fallthrough")
protected double evaluate(double[] ds) throws EvaluationException {
// All finance functions have 3 to 5 args, first 4 are numbers, last is boolean
// default for last 2 args are 0.0 and false
switch(ds.length) {
case 5:
arg4 = ds[4];
+ // fall through
case 4:
arg3 = ds[3];
+ // fall through
case 3:
break;
default:
}
}
+ @SuppressWarnings("fallthrough")
public ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol) {
if(args.length < 3 || args.length > 5) {
return ErrorEval.VALUE_INVALID;
return readData(stream, section);
}
+ @SuppressWarnings("fallthrough")
static public byte[] readData( InputStream stream, int eofChar )
throws IOException
{
case 'E':
case 'F':
baseChar = 'A';
+ // fall through
case 'a':
case 'b':
case 'c':
<Field name="pitch" />
</Or>
</Match>
+ <Match>
+ <Class name="org.apache.poi.hssf.usermodel.HSSFCell"/>
+ <Or>
+ <Method name="setCellValue" params="double" />
+ <Method name="setCellValue" params="boolean" />
+ <Method name="setCellErrorValue" params="byte" />
+ </Or>
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
+ <Match>
+ <Class name="org.apache.poi.hssf.usermodel.HSSFWorkbook"/>
+ <Method name="addPicture" />
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
+ <Match>
+ <Class name="org.apache.poi.ss.formula.atp.YearFrac"/>
+ <Method name="evaluate" />
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
+ <Match>
+ <Class name="org.apache.poi.ss.formula.functions.FinanceFunction"/>
+ <Method name="evaluate" />
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
+ <Match>
+ <Class name="org.apache.poi.ss.formula.functions.Offset"/>
+ <Method name="evaluate" />
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
+ <Match>
+ <Class name="org.apache.poi.util.HeadRead"/>
+ <Method name="readData" params="java.io.InputStream,int" />
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
<!-- invalid performance issues - e.g. see #57840 -->