Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java 
Sat Sep 16 08:28:38 2017
@@ -131,8 +131,7 @@ public abstract class HSLFSimpleShape ex
     public double getLineWidth(){
         AbstractEscherOptRecord opt = getEscherOptRecord();
         EscherSimpleProperty prop = getEscherProperty(opt, 
EscherProperties.LINESTYLE__LINEWIDTH);
-        double width = (prop == null) ? DEFAULT_LINE_WIDTH : 
Units.toPoints(prop.getPropertyValue());
-        return width;
+        return (prop == null) ? DEFAULT_LINE_WIDTH : 
Units.toPoints(prop.getPropertyValue());
     }
 
     /**

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java 
Sat Sep 16 08:28:38 2017
@@ -402,8 +402,7 @@ implements HSLFShapeContainer, TableShap
         }
         
         // TODO: check for merged cols
-        double width = cells[0][col].getAnchor().getWidth();
-        return width;
+        return cells[0][col].getAnchor().getWidth();
     }
 
     @Override

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
 Sat Sep 16 08:28:38 2017
@@ -1212,8 +1212,7 @@ public final class HSLFTextParagraph imp
      * representation
      */
     protected static String toInternalString(String s) {
-        String ns = s.replaceAll("\\r?\\n", "\r");
-        return ns;
+        return s.replaceAll("\\r?\\n", "\r");
     }
 
     /**

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java 
Sat Sep 16 08:28:38 2017
@@ -415,8 +415,7 @@ public final class HSLFTextRun implement
             return null;
         }
                Color color = 
HSLFTextParagraph.getColorFromColorIndexStruct(tp.getValue(), 
parentParagraph.getSheet());
-               SolidPaint ps = DrawPaint.createSolidPaint(color);
-               return ps;
+        return DrawPaint.createSolidPaint(color);
        }
 
        /**

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextShape.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextShape.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextShape.java 
Sat Sep 16 08:28:38 2017
@@ -723,8 +723,7 @@ implements TextShape<HSLFShape,HSLFTextP
 
     @Override
     public Insets2D getInsets() {
-        Insets2D insets = new Insets2D(getTopInset(), getLeftInset(), 
getBottomInset(), getRightInset());
-        return insets;
+        return new Insets2D(getTopInset(), getLeftInset(), getBottomInset(), 
getRightInset());
     }
 
     @Override

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/AbstractExcelUtils.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/AbstractExcelUtils.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/AbstractExcelUtils.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/AbstractExcelUtils.java
 Sat Sep 16 08:28:38 2017
@@ -185,11 +185,10 @@ public class AbstractExcelUtils
     {
         CellRangeAddress[] mergedRangeRowInfo = rowNumber < 
mergedRanges.length ? mergedRanges[rowNumber]
                 : null;
-        CellRangeAddress cellRangeAddress = mergedRangeRowInfo != null
+
+        return mergedRangeRowInfo != null
                 && columnNumber < mergedRangeRowInfo.length ? 
mergedRangeRowInfo[columnNumber]
                 : null;
-
-        return cellRangeAddress;
     }
 
     static boolean isEmpty( String str )

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
 Sat Sep 16 08:28:38 2017
@@ -154,8 +154,7 @@ public class ExcelToHtmlConverter extend
                 XMLHelper.getDocumentBuilderFactory().newDocumentBuilder()
                         .newDocument() );
         excelToHtmlConverter.processWorkbook( workbook );
-        Document doc = excelToHtmlConverter.getDocument();
-        return doc;
+        return excelToHtmlConverter.getDocument();
     }
 
     private String cssClassContainerCell;

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java 
Sat Sep 16 08:28:38 2017
@@ -597,8 +597,7 @@ public final class HSSFChart {
 
        private PlotAreaRecord createPlotAreaRecord()
        {
-               PlotAreaRecord r = new PlotAreaRecord(  );
-               return r;
+        return new PlotAreaRecord(  );
        }
 
        private AxisLineFormatRecord createAxisLineFormatRecord( short format )

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java Sat Sep 
16 08:28:38 2017
@@ -667,7 +667,6 @@ public final class HWPFDocument extends
 
         // get fcMin and fcMac because we will be writing the actual text with 
the
         // complex table.
-        int fcMin = mainOffset;
 
         /*
          * clx (encoding of the sprm lists for a complex file and piece table
@@ -736,7 +735,7 @@ public final class HWPFDocument extends
 
         // write out the CHPBinTable.
         _fib.setFcPlcfbteChpx(tableOffset);
-        _cbt.writeTo(wordDocumentStream, tableStream, fcMin, 
_cft.getTextPieceTable());
+        _cbt.writeTo(wordDocumentStream, tableStream, mainOffset, 
_cft.getTextPieceTable());
         _fib.setLcbPlcfbteChpx(tableStream.size() - tableOffset);
         tableOffset = tableStream.size();
 
@@ -892,7 +891,7 @@ public final class HWPFDocument extends
         tableOffset = tableStream.size();
 
         // set some variables in the FileInformationBlock.
-        _fib.getFibBase().setFcMin(fcMin);
+        _fib.getFibBase().setFcMin(mainOffset);
         _fib.getFibBase().setFcMac(fcMac);
         _fib.setCbMac(wordDocumentStream.size());
 

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
 Sat Sep 16 08:28:38 2017
@@ -194,8 +194,7 @@ public abstract class AbstractWordConver
         original.bold = characterRun.isBold();
         original.italic = characterRun.isItalic();
         original.fontName = characterRun.getFontName();
-        Triplet updated = getFontReplacer().update( original );
-        return updated;
+        return getFontReplacer().update( original );
     }
 
     public abstract Document getDocument();

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java
 Sat Sep 16 08:28:38 2017
@@ -111,8 +111,7 @@ public class HtmlDocumentFacade
                 stringBuilder.append( "}\n" );
             }
         }
-        final String stylesheetText = stringBuilder.toString();
-        return stylesheetText;
+        return stringBuilder.toString();
     }
 
     public Element createBlock()
@@ -179,8 +178,7 @@ public class HtmlDocumentFacade
 
     public Element createSelect()
     {
-        Element result = document.createElement( "select" );
-        return result;
+        return document.createElement( "select" );
     }
 
     public Element createTable()

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/RecordUtil.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/RecordUtil.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/RecordUtil.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/RecordUtil.java Sat 
Sep 16 08:28:38 2017
@@ -118,8 +118,7 @@ public class RecordUtil
 
         for ( int x = 0; x < parentSize; x++ )
         {
-            int temp = mask;
-            numBits += ( temp >> x ) & 0x1;
+            numBits += ( mask >> x ) & 0x1;
         }
 
         if ( numBits == 1 )

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java Sat 
Sep 16 08:28:38 2017
@@ -226,8 +226,7 @@ public class CHPBinTable
             final int boundary = objBoundary.intValue();
 
             final int startInclusive = lastTextRunStart;
-            final int endExclusive = boundary;
-            lastTextRunStart = endExclusive;
+            lastTextRunStart = boundary;
 
             int startPosition = binarySearch( oldChpxSortedByStartPos, 
boundary );
             startPosition = Math.abs( startPosition );
@@ -246,7 +245,7 @@ public class CHPBinTable
                     break;
 
                 int left = Math.max( startInclusive, chpx.getStart() );
-                int right = Math.min( endExclusive, chpx.getEnd() );
+                int right = Math.min(boundary, chpx.getEnd() );
 
                 if ( left < right )
                 {
@@ -258,10 +257,10 @@ public class CHPBinTable
             {
                 logger.log( POILogger.WARN, "Text piece [",
                         Integer.valueOf( startInclusive ), "; ",
-                        Integer.valueOf( endExclusive ),
+                        Integer.valueOf(boundary),
                         ") has no CHPX. Creating new one." );
                 // create it manually
-                CHPX chpx = new CHPX( startInclusive, endExclusive,
+                CHPX chpx = new CHPX( startInclusive, boundary,
                         new SprmBuffer( 0 ) );
                 newChpxs.add( chpx );
                 continue;
@@ -272,7 +271,7 @@ public class CHPBinTable
                 // can we reuse existing?
                 CHPX existing = chpxs.get( 0 );
                 if ( existing.getStart() == startInclusive
-                        && existing.getEnd() == endExclusive )
+                        && existing.getEnd() == boundary)
                 {
                     newChpxs.add( existing );
                     continue;
@@ -286,7 +285,7 @@ public class CHPBinTable
             {
                 sprmBuffer.append( chpx.getGrpprl(), 0 );
             }
-            CHPX newChpx = new CHPX( startInclusive, endExclusive, sprmBuffer 
);
+            CHPX newChpx = new CHPX( startInclusive, boundary, sprmBuffer );
             newChpxs.add( newChpx );
 
             continue;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java Sat Sep 16 
08:28:38 2017
@@ -72,9 +72,8 @@ public final class CHPX extends ByteProp
         }
 
         CharacterProperties baseStyle = ss.getCharacterStyle( istd );
-        CharacterProperties props = CharacterSprmUncompressor.uncompressCHP(
+        return CharacterSprmUncompressor.uncompressCHP(
                 ss, baseStyle, getGrpprl(), 0 );
-        return props;
     }
 
   public String toString() {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java Sat 
Sep 16 08:28:38 2017
@@ -151,8 +151,7 @@ public final class ListTables
         return null;
     }
     if(level < lst.numLevels()) {
-       ListLevel lvl = lst.getLevels()[level];
-       return lvl;
+        return lst.getLevels()[level];
     }
     if (log.check(POILogger.WARN)) {
         log.log(POILogger.WARN, "Requested level " + level + " which was 
greater than the maximum defined (" + lst.numLevels() + ")");

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
 Sat Sep 16 08:28:38 2017
@@ -361,8 +361,6 @@ public final class PAPFormattedDiskPage
     {
       int pheOffset = _offset + 1 + (((_crun + 1) * 4) + (index * 13));
 
-      ParagraphHeight phe = new ParagraphHeight(_fkp, pheOffset);
-
-      return phe;
+        return new ParagraphHeight(_fkp, pheOffset);
     }
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java Sat Sep 16 
08:28:38 2017
@@ -151,8 +151,7 @@ public final class PAPX extends ByteProp
             
         short istd = getIstd();
         ParagraphProperties baseStyle = ss.getParagraphStyle(istd);
-        ParagraphProperties props = 
ParagraphSprmUncompressor.uncompressPAP(baseStyle, getGrpprl(), 2);
-        return props;
+        return ParagraphSprmUncompressor.uncompressPAP(baseStyle, getGrpprl(), 
2);
     }
 
     @Override

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfField.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfField.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfField.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfField.java Sat 
Sep 16 08:28:38 2017
@@ -64,8 +64,7 @@ public class PlexOfField
     }
 
     public String toString() {
-        String str = String.format(Locale.ROOT, "[%d, %d) - FLD - 0x%x; 0x%x"
+        return String.format(Locale.ROOT, "[%d, %d) - FLD - 0x%x; 0x%x"
             , getFcStart(), getFcEnd(), fld.getBoundaryType(), fld.getFlt());
-        return str;
     }
 }

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java 
Sat Sep 16 08:28:38 2017
@@ -89,14 +89,13 @@ public class SectionTable
         // Some files seem to lie about their unicode status, which
         //    is very very pesky. Try to work around these, but this
         //    is getting on for black magic...
-        int mainEndsAt = mainLength;
         boolean matchAt = false;
         boolean matchHalf = false;
         for (int i=0; i<_sections.size(); i++) {
             SEPX s = _sections.get(i);
-            if (s.getEnd() == mainEndsAt) {
+            if (s.getEnd() == mainLength) {
                 matchAt = true;
-            } else if(s.getEnd() == mainEndsAt || s.getEnd() == mainEndsAt-1) {
+            } else if(s.getEnd() == mainLength || s.getEnd() == mainLength -1) 
{
                 matchHalf = true;
             }
         }

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java 
Sat Sep 16 08:28:38 2017
@@ -107,11 +107,10 @@ public final class StyleDescription impl
       _name = StringUtil.getFromUnicodeLE(std, nameStart, 
(nameLength*multiplier)/2);
 
       //length then null terminator.
-      int grupxStart = ((nameLength + 1) * multiplier) + nameStart;
 
       // the spec only refers to two possible upxs but it mentions
       // that more may be added in the future
-      int varOffset = grupxStart;
+      int varOffset = ((nameLength + 1) * multiplier) + nameStart;
       int countOfUPX = _stdfBase.getCupx();
       _upxs = new UPX[countOfUPX];
       for(int x = 0; x < countOfUPX; x++)

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java Sat 
Sep 16 08:28:38 2017
@@ -73,12 +73,11 @@ public class TextPiece extends PropertyN
      * Create the StringBuilder from the text and unicode flag
      */
     private static StringBuilder buildInitSB(byte[] text, PieceDescriptor pd) {
-        byte[] textBuffer = text;
         if (StringUtil.BIG5.equals(pd.getCharset())) {
             return new StringBuilder(CodePageUtil.cp950ToString(text, 0, 
text.length));
         }
 
-        String str = new String(textBuffer, 0, textBuffer.length, 
(pd.isUnicode()) ? StringUtil.UTF16LE : pd.getCharset());
+        String str = new String(text, 0, text.length, (pd.isUnicode()) ? 
StringUtil.UTF16LE : pd.getCharset());
         return new StringBuilder(str);
     }
 

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java 
Sat Sep 16 08:28:38 2017
@@ -657,8 +657,7 @@ public final class CharacterRun extends
                         getPicOffset() );
                 FFData ffData = new FFData( data.getBinData(), 0 );
 
-                String[] values = ffData.getDropList();
-                return values;
+                return ffData.getDropList();
             }
         }
         return null;

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/DateAndTime.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/DateAndTime.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/DateAndTime.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/DateAndTime.java 
Sat Sep 16 08:28:38 2017
@@ -54,15 +54,14 @@ public final class DateAndTime
   
   public Calendar getDate() {
      // TODO Discover if the timezone is stored somewhere else or not
-     Calendar cal = LocaleUtil.getLocaleCalendar(
-           _years.getValue(_info2)+1900, 
-           _months.getValue(_info2)-1, 
-           _dom.getValue(_info), 
-           _hours.getValue(_info), 
-           _minutes.getValue(_info),
-           0
-     );
-     return cal;
+      return LocaleUtil.getLocaleCalendar(
+            _years.getValue(_info2)+1900,
+            _months.getValue(_info2)-1,
+            _dom.getValue(_info),
+            _hours.getValue(_info),
+            _minutes.getValue(_info),
+            0
+      );
   }
 
   public void serialize(byte[] buf, int offset)

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java 
Sat Sep 16 08:28:38 2017
@@ -187,11 +187,10 @@ public class FieldsImpl implements Field
             {
             case FieldDescriptor.FIELD_SEPARATOR_MARK:
             {
-                PlexOfField separatorPlexOfField = nextPlexOfField;
 
                 int endNodePositionInList = binarySearch( plexOfFields,
                         nextNodePositionInList, endOffsetExclusive,
-                        separatorPlexOfField.getFcEnd() );
+                        nextPlexOfField.getFcEnd() );
                 if ( endNodePositionInList < 0 )
                 {
                     /*
@@ -212,17 +211,17 @@ public class FieldsImpl implements Field
                 }
 
                 FieldImpl field = new FieldImpl( startPlexOfField,
-                        separatorPlexOfField, endPlexOfField );
+                        nextPlexOfField, endPlexOfField );
                 result.add( field );
 
                 // adding included fields
-                if ( startPlexOfField.getFcStart() + 1 < separatorPlexOfField
+                if ( startPlexOfField.getFcStart() + 1 < nextPlexOfField
                         .getFcStart() - 1 )
                 {
                     parseFieldStructureImpl( plexOfFields, next + 1,
                             nextNodePositionInList, result );
                 }
-                if ( separatorPlexOfField.getFcStart() + 1 < endPlexOfField
+                if ( nextPlexOfField.getFcStart() + 1 < endPlexOfField
                         .getFcStart() - 1 )
                 {
                     parseFieldStructureImpl( plexOfFields,

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java 
Sat Sep 16 08:28:38 2017
@@ -136,8 +136,7 @@ public final class HWPFList
                     + " is more than number of level for list ("
                     + _listData.numLevels() + ")" );
         }
-        ListLevel lvl = _listData.getLevels()[level];
-        return lvl;
+        return _listData.getLevels()[level];
     }
 
     /**

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
 Sat Sep 16 08:28:38 2017
@@ -237,9 +237,8 @@ public class OfficeDrawingsImpl implemen
                         .lookup( propertyId );
                 if ( escherProperty == null )
                     return defaultValue;
-                int value = escherProperty.getPropertyValue();
 
-                return value;
+                return escherProperty.getPropertyValue();
             }
 
             public VerticalPositioning getVerticalPositioning()

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java 
Sat Sep 16 08:28:38 2017
@@ -565,9 +565,8 @@ public class Paragraph extends Range imp
         {
             throw new IllegalStateException( "Paragraph not in list" );
         }
-        HWPFList hwpfList = new HWPFList( getDocument().getStyleSheet(),
+        return new HWPFList( getDocument().getStyleSheet(),
                 getDocument().getListTables(), getIlfo() );
-        return hwpfList;
     }
 
     public boolean isInList()

Modified: 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java
 (original)
+++ 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java
 Sat Sep 16 08:28:38 2017
@@ -57,8 +57,7 @@ public class TestWordToFoConverter
                 new DOMSource( wordToFoConverter.getDocument() ),
                 new StreamResult( stringWriter ) );
 
-        String result = stringWriter.toString();
-        return result;
+        return stringWriter.toString();
     }
 
     @Test

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/model/TestSheet.java Sat Sep 16 
08:28:38 2017
@@ -541,8 +541,7 @@ public final class TestSheet {
                MyIndexRecordListener myIndexListener = new 
MyIndexRecordListener();
                sheet.visitContainedRecords(myIndexListener, 0);
                IndexRecord indexRecord = myIndexListener.getIndexRecord();
-               int dbCellRecordPos = indexRecord.getDbcellAt(0);
-               return dbCellRecordPos;
+        return indexRecord.getDbcellAt(0);
        }
 
        private static final class MyIndexRecordListener implements 
RecordVisitor {

Modified: 
poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
 (original)
+++ 
poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
 Sat Sep 16 08:28:38 2017
@@ -74,9 +74,7 @@ public final class TestColumnInfoRecords
                public static ColumnInfoRecord[] 
getRecords(ColumnInfoRecordsAggregate agg) {
                        CIRCollector circ = new CIRCollector();
                        agg.visitContainedRecords(circ);
-                       ColumnInfoRecord[] result =
-                   circ._list.toArray(new ColumnInfoRecord[circ._list.size()]);
-                       return result;
+            return circ._list.toArray(new ColumnInfoRecord[circ._list.size()]);
                }
        }
 

Modified: 
poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java 
(original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java 
Sat Sep 16 08:28:38 2017
@@ -160,9 +160,8 @@ public final class TestOLE2Embeding {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        wb.write(bos);
        wb.close();
-       POIFSFileSystem poifs = new POIFSFileSystem(new 
ByteArrayInputStream(bos.toByteArray()));
-        
-        return poifs;
+
+        return new POIFSFileSystem(new 
ByteArrayInputStream(bos.toByteArray()));
     }
     
     static byte[] getSampleTXT() {

Modified: 
poi/trunk/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShowFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShowFactory.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShowFactory.java
 (original)
+++ 
poi/trunk/src/testcases/org/apache/poi/sl/usermodel/BaseTestSlideShowFactory.java
 Sat Sep 16 08:28:38 2017
@@ -154,8 +154,7 @@ public class BaseTestSlideShowFactory {
         } catch (final IOException e) {
             throw new RuntimeException(e);
         }
-        final byte[] bytes = baos.toByteArray();
-        return bytes;
+        return baos.toByteArray();
     }
 
     /**

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
 (original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
 Sat Sep 16 08:28:38 2017
@@ -110,7 +110,6 @@ public final class TestYearFracCalculato
        private static double getDoubleCell(HSSFRow row, int colIx) {
                HSSFCell cell = row.getCell(colIx);
                assertNotNull("No cell found at column " + colIx, cell);
-               double dVal = cell.getNumericCellValue();
-               return dVal;
+        return cell.getNumericCellValue();
        }
 }

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java 
(original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java 
Sat Sep 16 08:28:38 2017
@@ -239,9 +239,8 @@ public final class TestFormulaBugs {
                cell.setCellFormula(formula);
                
                FormulaEvaluator evaluator = 
wb.getCreationHelper().createFormulaEvaluator();
-               CellValue value = evaluator.evaluate(cell);
-               
-               return value;
+
+        return evaluator.evaluate(cell);
        }
 
        private void checkFormulaValue(Workbook wb, Cell cell, String formula, 
double expectedValue) {

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java 
(original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java 
Sat Sep 16 08:28:38 2017
@@ -97,8 +97,7 @@ public final class TestMinusZeroResult e
                for (int i = 0; i < evalArgs.length; i++) {
                        evalArgs[i] = new NumberEval(dArgs[i]);
                }
-               ValueEval r = instance.evaluate(evalArgs, -1, (short)-1);
-               return r;
+        return instance.evaluate(evalArgs, -1, (short)-1);
        }
 
        /**

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/function/TestReadMissingBuiltInFuncs.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/function/TestReadMissingBuiltInFuncs.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/function/TestReadMissingBuiltInFuncs.java
 (original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/function/TestReadMissingBuiltInFuncs.java
 Sat Sep 16 08:28:38 2017
@@ -159,10 +159,9 @@ public final class TestReadMissingBuiltI
        }
 
        private String getCellFormula(int rowIx) {
-               String result = 
_sheet.getRow(rowIx).getCell(0).getCellFormula();
-//             if (false) {
+        //             if (false) {
 //                     System.err.println(result);
 //             }
-               return result;
+               return _sheet.getRow(rowIx).getCell(0).getCellFormula();
        }
 }

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java 
(original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java 
Sat Sep 16 08:28:38 2017
@@ -97,9 +97,8 @@ public final class TestBin2Dec extends T
                 return true;
             }
         }, null);
-        OperationEvaluationContext ctx = new 
OperationEvaluationContext(workbookEvaluator, 
+        return new OperationEvaluationContext(workbookEvaluator,
                 workbook, 0, 0, 0, null);
-        return ctx;
     }
 
     public void testRefs() {

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java 
(original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java 
Sat Sep 16 08:28:38 2017
@@ -117,9 +117,8 @@ public final class TestDec2Bin extends T
                 return true;
             }
         }, null);
-        OperationEvaluationContext ctx = new 
OperationEvaluationContext(workbookEvaluator, 
+        return new OperationEvaluationContext(workbookEvaluator,
                 workbook, 0, 0, 0, null);
-        return ctx;
     }
 
     public void testRefs() {

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java 
(original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java 
Sat Sep 16 08:28:38 2017
@@ -142,9 +142,8 @@ public final class TestDec2Hex extends T
                 return true;
             }
         }, null);
-        OperationEvaluationContext ctx = new 
OperationEvaluationContext(workbookEvaluator, 
+        return new OperationEvaluationContext(workbookEvaluator,
                 workbook, 0, 0, 0, null);
-        return ctx;
     }
 
     public void testRefs() {

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java 
(original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java 
Sat Sep 16 08:28:38 2017
@@ -95,9 +95,8 @@ public final class TestHex2Dec extends T
                 return true;
             }
         }, null);
-        OperationEvaluationContext ctx = new 
OperationEvaluationContext(workbookEvaluator, 
+        return new OperationEvaluationContext(workbookEvaluator,
                 workbook, 0, 0, 0, null);
-        return ctx;
     }
 
     public void testRefs() {

Modified: poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java?rev=1808518&r1=1808517&r2=1808518&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java 
(original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java Sat 
Sep 16 08:28:38 2017
@@ -137,7 +137,6 @@ public final class TestAreaPtg extends T
                                
aptg.setLastColumn((short)(aptg.getLastColumn()+letUsShiftColumn1By1Column));
                        }
                }
-               String newFormula = HSSFFormulaParser.toFormulaString(wb, ptgs);
-               return newFormula;
+        return HSSFFormulaParser.toFormulaString(wb, ptgs);
        }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to