findbugs fixes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751195 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-07-04 02:14:02 +00:00
parent 954306ea2e
commit 909b428443
2 changed files with 58 additions and 56 deletions

View File

@ -126,8 +126,7 @@ public class BitField
* value; the results of using it for a multi-bit field is to * value; the results of using it for a multi-bit field is to
* determine whether *any* of its bits are set * determine whether *any* of its bits are set
* *
* @param holder the int data containing the bits we're interested * @param holder the int data containing the bits we're interested in
* in
* *
* @return true if any of the bits are set, else false * @return true if any of the bits are set, else false
*/ */
@ -142,8 +141,7 @@ public class BitField
* isSet, in that all of the bits in a multi-bit set must be set * isSet, in that all of the bits in a multi-bit set must be set
* for this method to return true * for this method to return true
* *
* @param holder the int data containing the bits we're interested * @param holder the int data containing the bits we're interested in
* in
* *
* @return true if all of the bits are set, else false * @return true if all of the bits are set, else false
*/ */
@ -156,8 +154,7 @@ public class BitField
/** /**
* Replace the bits with new values. * Replace the bits with new values.
* *
* @param holder the int data containint the bits we're interested * @param holder the int data containing the bits we're interested in
* in
* @param value the new value for the specified bits * @param value the new value for the specified bits
* *
* @return the value of holder with the bits from the value * @return the value of holder with the bits from the value
@ -172,8 +169,7 @@ public class BitField
/** /**
* Replace the bits with new values. * Replace the bits with new values.
* *
* @param holder the short data containing the bits we're * @param holder the short data containing the bits we're interested in
* interested in
* @param value the new value for the specified bits * @param value the new value for the specified bits
* *
* @return the value of holder with the bits from the value * @return the value of holder with the bits from the value
@ -188,8 +184,7 @@ public class BitField
/** /**
* Clear the bits. * Clear the bits.
* *
* @param holder the int data containing the bits we're interested * @param holder the int data containing the bits we're interested in
* in
* *
* @return the value of holder with the specified bits cleared * @return the value of holder with the specified bits cleared
* (set to 0) * (set to 0)

View File

@ -95,73 +95,80 @@ public final class BorderCode implements Cloneable {
return _dptLineWidth.getShortValue(_info); return _dptLineWidth.getShortValue(_info);
} }
/**
* @param lineWidth the width of the line to set
*/
public void setLineWidth(int lineWidth) { public void setLineWidth(int lineWidth) {
_dptLineWidth.setValue(_info, lineWidth); _info = _dptLineWidth.setShortValue(_info, (short)lineWidth);
} }
/** /**
* Border type code: * Border type code:
* <li>0 none * <ul>
* <li>1 single * <li>0 none</li>
* <li>2 thick * <li>1 single</li>
* <li>3 double * <li>2 thick</li>
* <li>5 hairline * <li>3 double</li>
* <li>6 dot * <li>5 hairline</li>
* <li>7 dash large gap * <li>6 dot</li>
* <li>8 dot dash * <li>7 dash large gap</li>
* <li>9 dot dot dash * <li>8 dot dash</li>
* <li>10 triple * <li>9 dot dot dash</li>
* <li>11 thin-thick small gap * <li>10 triple</li>
* <li>12 thick-thin small gap * <li>11 thin-thick small gap</li>
* <li>13 thin-thick-thin small gap * <li>12 thick-thin small gap</li>
* <li>14 thin-thick medium gap * <li>13 thin-thick-thin small gap</li>
* <li>15 thick-thin medium gap * <li>14 thin-thick medium gap</li>
* <li>16 thin-thick-thin medium gap * <li>15 thick-thin medium gap</li>
* <li>17 thin-thick large gap * <li>16 thin-thick-thin medium gap</li>
* <li>18 thick-thin large gap * <li>17 thin-thick large gap</li>
* <li>19 thin-thick-thin large gap * <li>18 thick-thin large gap</li>
* <li>20 wave * <li>19 thin-thick-thin large gap</li>
* <li>21 double wave * <li>20 wave</li>
* <li>22 dash small gap * <li>21 double wave</li>
* <li>23 dash dot stroked * <li>22 dash small gap</li>
* <li>24 emboss 3D * <li>23 dash dot stroked</li>
* <li>25 engrave 3D * <li>24 emboss 3D</li>
* <li>codes 64 - 230 represent border art types and are used only for page borders * <li>25 engrave 3D</li>
* <li>codes 64 - 230 represent border art types and are used only for page borders</li>
* </ul>
*/ */
public int getBorderType() { public int getBorderType() {
return _brcType.getShortValue(_info); return _brcType.getShortValue(_info);
} }
public void setBorderType(int borderType) { public void setBorderType(int borderType) {
_info = (short)_brcType.setValue(_info, borderType); _info = _brcType.setShortValue(_info, (short)borderType);
} }
/** /**
* Color: * Color:
* <li>0 Auto * <ul>
* <li>1 Black * <li>0 Auto</li>
* <li>2 Blue * <li>1 Black</li>
* <li>3 Cyan * <li>2 Blue</li>
* <li>4 Green * <li>3 Cyan</li>
* <li>5 Magenta * <li>4 Green</li>
* <li>6 Red * <li>5 Magenta</li>
* <li>7 Yellow * <li>6 Red</li>
* <li>8 White * <li>7 Yellow</li>
* <li>9 DkBlue * <li>8 White</li>
* <li>10 DkCyan * <li>9 DkBlue</li>
* <li>11 DkGreen * <li>10 DkCyan</li>
* <li>12 DkMagenta * <li>11 DkGreen</li>
* <li>13 DkRed * <li>12 DkMagenta</li>
* <li>14 DkYellow * <li>13 DkRed</li>
* <li>15 DkGray * <li>14 DkYellow</li>
* <li>16 LtGray * <li>15 DkGray</li>
* <li>16 LtGray</li>
* </ul>
*/ */
public short getColor() { public short getColor() {
return _ico.getShortValue(_info2); return _ico.getShortValue(_info2);
} }
public void setColor(short color) { public void setColor(short color) {
_info2 = (short)_ico.setValue(_info2, color); _info2 = _ico.setShortValue(_info2, color);
} }
/** /**