]> source.dussan.org Git - poi.git/commitdiff
FindBugs - DLS_DEAD_LOCAL_STORE
authorAndreas Beeker <kiwiwings@apache.org>
Sat, 15 Aug 2015 13:05:00 +0000 (13:05 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sat, 15 Aug 2015 13:05:00 +0000 (13:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696050 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java
src/java/org/apache/poi/poifs/storage/DataInputBlock.java
src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java

index a35eb16d7ca105d28d0592f3757e0fab00be9e7b..f64bf23c7c6c1c06bc86f4dec5374835e2d67530 100644 (file)
@@ -328,8 +328,7 @@ public class DataSpaceMapUtils {
     public static String readUtf8LPP4(LittleEndianInput is) {\r
         int length = is.readInt();\r
         if (length == 0 || length == 4) {\r
-            @SuppressWarnings("unused")\r
-            int skip = is.readInt(); // ignore\r
+            /* int skip = */ is.readInt();\r
             return length == 0 ? null : "";\r
         }\r
         \r
index a571a4f22ef0f3b17affb4cd81b71e9df50a3671..2550d2d9100f6a6bb245577a2cb4a47cde64e2bb 100644 (file)
@@ -79,7 +79,7 @@ public final class DataInputBlock {
                // simple case - will always be one byte in each block
                int i = prevBlock._buf.length-1;
                
-               int b0 = prevBlock._buf[i++] & 0xFF;
+               int b0 = prevBlock._buf[i] & 0xFF;
                int b1 = _buf[_readIndex++] & 0xFF;
                return (b1 << 8) + (b0 << 0);
        }
index 2c0c11c61c5c9ab5004ef03f6dfed9d1ff508cab..62445f8522efc076b9c2c09de6145f09a49dc36b 100644 (file)
@@ -1485,16 +1485,16 @@ public final class WordDocument {
     _headerBuffer.append("</fo:simple-page-master>\r\n");
     return thisPage;
   }
-  @SuppressWarnings("unused")
+
   private void addBorder(StringBuffer buf, short[] brc, String where)
   {
     if((brc[0] & 0xff00) != 0 && brc[0] != -1)
     {
-      int type = (brc[0] & 0xff00) >> 8;
+      // int type = (brc[0] & 0xff00) >> 8;
       float width = (brc[0] & 0x00ff)/8.0f;
       String style = getBorderStyle(brc[0]);
       String color = getColor(brc[1] & 0x00ff);
-      String thickness = getBorderThickness(brc[0]);
+      // String thickness = getBorderThickness(brc[0]);
       buf.append("border-" + where + "-style=\"" + style + "\"\r\n");
       buf.append("border-" + where + "-color=\"" + color + "\"\r\n");
       buf.append("border-" + where + "-width=\"" + width + "pt\"\r\n");
@@ -1520,22 +1520,22 @@ public final class WordDocument {
       t.printStackTrace();
     }
   }
-  private String getBorderThickness(int style)
-  {
-    switch(style)
-    {
-      case 1:
-        return "medium";
-      case 2:
-        return "thick";
-      case 3:
-        return "medium";
-      case 5:
-        return "thin";
-      default:
-        return "medium";
-    }
-  }
+//  private String getBorderThickness(int style)
+//  {
+//    switch(style)
+//    {
+//      case 1:
+//        return "medium";
+//      case 2:
+//        return "thick";
+//      case 3:
+//        return "medium";
+//      case 5:
+//        return "thin";
+//      default:
+//        return "medium";
+//    }
+//  }
 
 
   private String getColor(int ico)