poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1751195 - in /poi/trunk/src: java/org/apache/poi/util/BitField.java scratchpad/src/org/apache/poi/hwpf/usermodel/BorderCode.java
Date Mon, 04 Jul 2016 02:14:03 GMT
Author: onealj
Date: Mon Jul  4 02:14:02 2016
New Revision: 1751195

URL: http://svn.apache.org/viewvc?rev=1751195&view=rev
Log:
findbugs fixes

Modified:
    poi/trunk/src/java/org/apache/poi/util/BitField.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/BorderCode.java

Modified: poi/trunk/src/java/org/apache/poi/util/BitField.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/BitField.java?rev=1751195&r1=1751194&r2=1751195&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/BitField.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/BitField.java Mon Jul  4 02:14:02 2016
@@ -126,8 +126,7 @@ public class BitField
      * value; the results of using it for a multi-bit field is to
      * determine whether *any* of its bits are set
      *
-     * @param holder the int data containing the bits we're interested
-     *               in
+     * @param holder the int data containing the bits we're interested in
      *
      * @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
      * for this method to return true
      *
-     * @param holder the int data containing the bits we're interested
-     *               in
+     * @param holder the int data containing the bits we're interested in
      *
      * @return true if all of the bits are set, else false
      */
@@ -156,8 +154,7 @@ public class BitField
     /**
      * Replace the bits with new values.
      *
-     * @param holder the int data containint the bits we're interested
-     *               in
+     * @param holder the int data containing the bits we're interested in
      * @param value the new value for the specified bits
      *
      * @return the value of holder with the bits from the value
@@ -172,8 +169,7 @@ public class BitField
     /**
      * Replace the bits with new values.
      *
-     * @param holder the short data containing the bits we're
-     *               interested in
+     * @param holder the short data containing the bits we're interested in
      * @param value the new value for the specified bits
      *
      * @return the value of holder with the bits from the value
@@ -188,8 +184,7 @@ public class BitField
     /**
      * Clear the bits.
      *
-     * @param holder the int data containing the bits we're interested
-     *               in
+     * @param holder the int data containing the bits we're interested in
      *
      * @return the value of holder with the specified bits cleared
      *         (set to 0)

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/BorderCode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/BorderCode.java?rev=1751195&r1=1751194&r2=1751195&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/BorderCode.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/BorderCode.java Mon Jul  4
02:14:02 2016
@@ -95,73 +95,80 @@ public final class BorderCode implements
     return _dptLineWidth.getShortValue(_info);
   }
   
+  /**
+   * @param lineWidth the width of the line to set
+   */
   public void setLineWidth(int lineWidth) {
-    _dptLineWidth.setValue(_info, lineWidth);
+    _info = _dptLineWidth.setShortValue(_info, (short)lineWidth);
   }
 
   /**
    * Border type code:
-   * <li>0  none
-   * <li>1  single
-   * <li>2  thick
-   * <li>3  double
-   * <li>5  hairline
-   * <li>6  dot
-   * <li>7  dash large gap
-   * <li>8  dot dash
-   * <li>9  dot dot dash
-   * <li>10  triple
-   * <li>11  thin-thick small gap
-   * <li>12  thick-thin small gap
-   * <li>13  thin-thick-thin small gap
-   * <li>14  thin-thick medium gap
-   * <li>15  thick-thin medium gap
-   * <li>16  thin-thick-thin medium gap
-   * <li>17  thin-thick large gap
-   * <li>18  thick-thin large gap
-   * <li>19  thin-thick-thin large gap
-   * <li>20  wave
-   * <li>21  double wave
-   * <li>22  dash small gap
-   * <li>23  dash dot stroked
-   * <li>24  emboss 3D
-   * <li>25  engrave 3D
-   * <li>codes 64 - 230 represent border art types and are used only for page borders
+   * <ul>
+   * <li>0  none</li>
+   * <li>1  single</li>
+   * <li>2  thick</li>
+   * <li>3  double</li>
+   * <li>5  hairline</li>
+   * <li>6  dot</li>
+   * <li>7  dash large gap</li>
+   * <li>8  dot dash</li>
+   * <li>9  dot dot dash</li>
+   * <li>10  triple</li>
+   * <li>11  thin-thick small gap</li>
+   * <li>12  thick-thin small gap</li>
+   * <li>13  thin-thick-thin small gap</li>
+   * <li>14  thin-thick medium gap</li>
+   * <li>15  thick-thin medium gap</li>
+   * <li>16  thin-thick-thin medium gap</li>
+   * <li>17  thin-thick large gap</li>
+   * <li>18  thick-thin large gap</li>
+   * <li>19  thin-thick-thin large gap</li>
+   * <li>20  wave</li>
+   * <li>21  double wave</li>
+   * <li>22  dash small gap</li>
+   * <li>23  dash dot stroked</li>
+   * <li>24  emboss 3D</li>
+   * <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() {
     return _brcType.getShortValue(_info);
   }
   
   public void setBorderType(int borderType) {
-      _info = (short)_brcType.setValue(_info, borderType);
+      _info = _brcType.setShortValue(_info, (short)borderType);
   }
   
   /**
    * Color:
-   * <li>0  Auto
-   * <li>1  Black
-   * <li>2  Blue
-   * <li>3  Cyan
-   * <li>4  Green
-   * <li>5  Magenta
-   * <li>6  Red
-   * <li>7  Yellow
-   * <li>8  White
-   * <li>9  DkBlue
-   * <li>10  DkCyan
-   * <li>11  DkGreen
-   * <li>12  DkMagenta
-   * <li>13  DkRed
-   * <li>14  DkYellow
-   * <li>15  DkGray
-   * <li>16  LtGray
+   * <ul>
+   * <li>0  Auto</li>
+   * <li>1  Black</li>
+   * <li>2  Blue</li>
+   * <li>3  Cyan</li>
+   * <li>4  Green</li>
+   * <li>5  Magenta</li>
+   * <li>6  Red</li>
+   * <li>7  Yellow</li>
+   * <li>8  White</li>
+   * <li>9  DkBlue</li>
+   * <li>10  DkCyan</li>
+   * <li>11  DkGreen</li>
+   * <li>12  DkMagenta</li>
+   * <li>13  DkRed</li>
+   * <li>14  DkYellow</li>
+   * <li>15  DkGray</li>
+   * <li>16  LtGray</li>
+   * </ul>
    */
   public short getColor() {
     return _ico.getShortValue(_info2);
   }
   
   public void setColor(short color) {
-      _info2 = (short)_ico.setValue(_info2, color);
+      _info2 = _ico.setShortValue(_info2, color);
   }
   
   /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message