From 096e3e820b19dc2e6dd0ef313253cb1c0ed97d88 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 17 Jul 2016 21:18:19 +0000 Subject: [PATCH] Adjust unused local variables to also make FindBugs happy git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753124 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hwmf/record/HwmfBitmap16.java | 4 +--- .../src/org/apache/poi/hwmf/record/HwmfColorRef.java | 3 +-- .../src/org/apache/poi/hwmf/record/HwmfFill.java | 12 ++++-------- .../src/org/apache/poi/hwmf/record/HwmfMisc.java | 3 +-- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmap16.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmap16.java index 4439b784dd..3a774af2e4 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmap16.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmap16.java @@ -84,8 +84,6 @@ public class HwmfBitmap16 { } public BufferedImage getImage() { - BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); - return bi; + return new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); } - } diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfColorRef.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfColorRef.java index 541b98219b..a3b1aa206a 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfColorRef.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfColorRef.java @@ -43,8 +43,7 @@ public class HwmfColorRef implements Cloneable { int red = leis.readUByte(); int green = leis.readUByte(); int blue = leis.readUByte(); - @SuppressWarnings("unused") - int reserved = leis.readUByte(); + /*int reserved =*/ leis.readUByte(); colorRef = new Color(red, green, blue); return 4*LittleEndianConsts.BYTE_SIZE; diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfFill.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfFill.java index e13164f348..4b227f7d16 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfFill.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfFill.java @@ -482,8 +482,7 @@ public class HwmfFill { xSrc = leis.readShort(); size = 6*LittleEndianConsts.SHORT_SIZE; if (!hasBitmap) { - @SuppressWarnings("unused") - int reserved = leis.readShort(); + /*int reserved =*/ leis.readShort(); size += LittleEndianConsts.SHORT_SIZE; } destHeight = leis.readShort(); @@ -685,8 +684,7 @@ public class HwmfFill { size = 4*LittleEndianConsts.SHORT_SIZE; if (!hasBitmap) { - @SuppressWarnings("unused") - int reserved = leis.readShort(); + /*int reserved =*/ leis.readShort(); size += LittleEndianConsts.SHORT_SIZE; } @@ -872,8 +870,7 @@ public class HwmfFill { xSrc = leis.readShort(); size = 4*LittleEndianConsts.SHORT_SIZE; if (!hasBitmap) { - @SuppressWarnings("unused") - int reserved = leis.readShort(); + /*int reserved =*/ leis.readShort(); size += LittleEndianConsts.SHORT_SIZE; } height = leis.readShort(); @@ -979,8 +976,7 @@ public class HwmfFill { xSrc = leis.readShort(); size = 6*LittleEndianConsts.SHORT_SIZE; if (!hasBitmap) { - @SuppressWarnings("unused") - int reserved = leis.readShort(); + /*int reserved =*/ leis.readShort(); size += LittleEndianConsts.SHORT_SIZE; } destHeight = leis.readShort(); diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfMisc.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfMisc.java index c597b1d964..c8f280ecdd 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfMisc.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfMisc.java @@ -184,12 +184,11 @@ public class HwmfMisc { return HwmfRecordType.setLayout; } - @SuppressWarnings("unused") @Override public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException { layout = leis.readUShort(); // A 16-bit field that MUST be ignored. - int reserved = leis.readShort(); + /*int reserved =*/ leis.readShort(); return 2*LittleEndianConsts.SHORT_SIZE; } -- 2.39.5