FindBugs - DLS_DEAD_LOCAL_STORE

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696050 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2015-08-15 13:05:00 +00:00
parent ef3dab6bd7
commit 5827cee62d
3 changed files with 21 additions and 22 deletions

View File

@ -328,8 +328,7 @@ public class DataSpaceMapUtils {
public static String readUtf8LPP4(LittleEndianInput is) {
int length = is.readInt();
if (length == 0 || length == 4) {
@SuppressWarnings("unused")
int skip = is.readInt(); // ignore
/* int skip = */ is.readInt();
return length == 0 ? null : "";
}

View 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);
}

View 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)