findbugs: fix URF_UNREAD_FIELD warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748084 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-06-13 04:42:59 +00:00
parent 81d15d29df
commit 1853126f9b
5 changed files with 30 additions and 14 deletions

View File

@ -27,12 +27,12 @@ import org.apache.poi.ss.util.CellRangeAddressList;
* Helper for working with Data Validation
*/
public class HSSFDataValidationHelper implements DataValidationHelper {
@SuppressWarnings("unused")
private HSSFSheet sheet;
//URF_UNREAD_FIELD
//private HSSFSheet sheet;
public HSSFDataValidationHelper(HSSFSheet sheet) {
super();
this.sheet = sheet;
//this.sheet = sheet;
}
/*

View File

@ -48,7 +48,8 @@ public class HSSFTextbox extends HSSFSimpleShape {
super(spContainer, objRecord, textObjectRecord);
}
HSSFRichTextString string = new HSSFRichTextString("");
//Unused: URF_UNREAD_FIELD
//HSSFRichTextString string = new HSSFRichTextString("");
/**
* Construct a new textbox with the given parent and anchor.

View File

@ -35,12 +35,13 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationType;
*
*/
public class XSSFDataValidationHelper implements DataValidationHelper {
private XSSFSheet xssfSheet;
//Unused: URF_UNREAD_FIELD
//private XSSFSheet xssfSheet;
public XSSFDataValidationHelper(XSSFSheet xssfSheet) {
super();
this.xssfSheet = xssfSheet;
//this.xssfSheet = xssfSheet;
}
/* (non-Javadoc)

View File

@ -43,7 +43,8 @@ public final class XSSFGraphicFrame extends XSSFShape {
private static CTGraphicalObjectFrame prototype = null;
private CTGraphicalObjectFrame graphicFrame;
private XSSFDrawing drawing;
// Unused: URF_UNREAD_FIELD
//private XSSFDrawing drawing;
private XSSFClientAnchor anchor;
/**

View File

@ -47,18 +47,31 @@
</Or>
<Bug code="Nm" />
</Match>
<!-- ignore fields that correspond to the values in a H??F binary record -->
<Match>
<Class name="org.apache.poi.hpsf.Decimal"/>
<Class name="~org\.apache\.poi\.h..f\..*"/>
<Bug pattern="URF_UNREAD_FIELD" />
<Field name="field_[12345]_.+" />
<Field name="~field_[12345].*" />
</Match>
<Match>
<Class name="org.apache.poi.hssf.usermodel.HSSFChart"/>
<Bug pattern="URF_UNREAD_FIELD" />
<Field name="chartTitleFormat" />
</Match>
<Match>
<Class name="org.apache.poi.hwmf.record.HwmfWindowing"/>
<Bug pattern="URF_UNREAD_FIELD" />
<Field name="count2" />
</Match>
<!-- invalid performance issues - e.g. see #57840 -->
<Match>
<Class name="org.apache.poi.xssf.usermodel.XSSFRow"/>
<Bug pattern="DM_NUMBER_CTOR" />
</Match>
<Match>
<Class name="org.apache.poi.xssf.usermodel.XSSFSheet"/>
<Or>
<Class name="org.apache.poi.xssf.usermodel.XSSFRow"/>
<Class name="org.apache.poi.xssf.usermodel.XSSFSheet"/>
</Or>
<Bug pattern="DM_NUMBER_CTOR" />
</Match>