Author: kiwiwings
Date: Sat Aug 15 11:57:57 2015
New Revision: 1696038

URL: http://svn.apache.org/r1696038
Log:
FindBugs - DLS_DEAD_LOCAL_STORE

Removed:
    poi/trunk/src/ooxml/java/org/apache/poi/util/MethodUtils.java
Modified:
    poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java
    poi/trunk/src/java/org/apache/poi/ddf/EscherDump.java
    poi/trunk/src/java/org/apache/poi/hssf/model/LineShape.java
    poi/trunk/src/java/org/apache/poi/hssf/model/PolygonShape.java
    poi/trunk/src/java/org/apache/poi/hssf/model/TextboxShape.java
    poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
    
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFName.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
    poi/trunk/src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java
    
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDecryptor.java
    
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptionInfoBuilder.java
    
poi/trunk/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptionInfoBuilder.java
    poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
    poi/trunk/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java
    poi/trunk/src/java/org/apache/poi/ss/formula/functions/Address.java
    
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java
    poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java
    
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/NewOleFile.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFDocument.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFObjectFactory.java
    
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java
    
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
    
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
    
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
    
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java Sat Aug 15 
11:57:57 2015
@@ -135,7 +135,6 @@ public class EscherComplexProperty exten
     }
 
     public String toXml(String tab){
-        String dataStr = HexDump.toHex( _complexData, 32);
         StringBuilder builder = new StringBuilder();
         
builder.append(tab).append("<").append(getClass().getSimpleName()).append(" 
id=\"0x").append(HexDump.toHex(getId()))
                 .append("\" name=\"").append(getName()).append("\" blipId=\"")

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherDump.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherDump.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherDump.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherDump.java Sat Aug 15 11:57:57 
2015
@@ -73,14 +73,12 @@ public final class EscherDump {
         short options;      // 4 bits for the version and 12 bits for the 
instance
         short recordId;
         int recordBytesRemaining;       // including enclosing records
-        StringBuffer stringBuf = new StringBuffer();
         short nDumpSize;
         String recordName;
 
         boolean atEOF = false;
 
         while (!atEOF && (remainingBytes > 0)) {
-            stringBuf = new StringBuffer();
             options = LittleEndian.readShort( in );
             recordId = LittleEndian.readShort( in );
             recordBytesRemaining = LittleEndian.readInt( in );
@@ -194,6 +192,7 @@ public final class EscherDump {
                         recordName = "UNKNOWN ID";
             }
 
+            StringBuilder stringBuf = new StringBuilder();
             stringBuf.append( "  " );
             stringBuf.append( HexDump.toHex( recordId ) );
             stringBuf.append( "  " ).append( recordName ).append( " [" );
@@ -203,6 +202,7 @@ public final class EscherDump {
             stringBuf.append( "]  instance: " );
             stringBuf.append( HexDump.toHex( ( (short) ( options >> 4 ) ) ) );
             out.println( stringBuf.toString() );
+            stringBuf.setLength(0);
 
 
             if ( recordId == (short) 0xF007 && 36 <= remainingBytes && 36 <= 
recordBytesRemaining )
@@ -213,7 +213,7 @@ public final class EscherDump {
                 //                short n16;
                 //                int n32;
 
-                stringBuf = new StringBuffer( "    btWin32: " );
+                stringBuf = stringBuf.append( "    btWin32: " );
                 n8 = (byte) in.read();
                 stringBuf.append( HexDump.toHex( n8 ) );
                 stringBuf.append( getBlipType( n8 ) );

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/LineShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/LineShape.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/LineShape.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/LineShape.java Sat Aug 15 
11:57:57 2015
@@ -55,7 +55,6 @@ public class LineShape
         EscherContainerRecord spContainer = new EscherContainerRecord();
         EscherSpRecord sp = new EscherSpRecord();
         EscherOptRecord opt = new EscherOptRecord();
-        EscherRecord anchor = new EscherClientAnchorRecord();
         EscherClientDataRecord clientData = new EscherClientDataRecord();
 
         spContainer.setRecordId( EscherContainerRecord.SP_CONTAINER );
@@ -74,7 +73,7 @@ public class LineShape
             sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ);
         if (userAnchor.isVerticallyFlipped())
             sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT);
-        anchor = createAnchor(userAnchor);
+        EscherRecord anchor = createAnchor(userAnchor);
         clientData.setRecordId( EscherClientDataRecord.RECORD_ID );
         clientData.setOptions( (short) 0x0000 );
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/PolygonShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/PolygonShape.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/PolygonShape.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/PolygonShape.java Sat Aug 15 
11:57:57 2015
@@ -130,8 +130,6 @@ public class PolygonShape
      */
     private ObjRecord createObjRecord( HSSFShape hssfShape, int shapeId )
     {
-        HSSFShape shape = hssfShape;
-
         ObjRecord obj = new ObjRecord();
         CommonObjectDataSubRecord c = new CommonObjectDataSubRecord();
         c.setObjectType( OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING );

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/TextboxShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/TextboxShape.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/TextboxShape.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/TextboxShape.java Sat Aug 15 
11:57:57 2015
@@ -84,7 +84,6 @@ public class TextboxShape
         EscherContainerRecord spContainer = new EscherContainerRecord();
         EscherSpRecord sp = new EscherSpRecord();
         EscherOptRecord opt = new EscherOptRecord();
-        EscherRecord anchor = new EscherClientAnchorRecord();
         EscherClientDataRecord clientData = new EscherClientDataRecord();
         escherTextbox = new EscherTextboxRecord();
 
@@ -113,7 +112,7 @@ public class TextboxShape
         //            sp.setFlags(sp.getFlags() | 
EscherSpRecord.FLAG_FLIPHORIZ);
         //        if (userAnchor.isVerticallyFlipped())
         //            sp.setFlags(sp.getFlags() | 
EscherSpRecord.FLAG_FLIPVERT);
-        anchor = createAnchor( userAnchor );
+        EscherRecord anchor = createAnchor( userAnchor );
         clientData.setRecordId( EscherClientDataRecord.RECORD_ID );
         clientData.setOptions( (short) 0x0000 );
         escherTextbox.setRecordId( EscherTextboxRecord.RECORD_ID );

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java Sat Aug 
15 11:57:57 2015
@@ -507,7 +507,7 @@ public final class HyperlinkRecord exten
 
                     //From the spec: An optional unsigned integer that MUST be 
3 if present
                     // but some files has 4
-                    int usKeyValue = in.readUShort();
+                    /*int usKeyValue = */ in.readUShort();
 
                     _address = StringUtil.readUnicodeLE(in, charDataSize/2);
                 } else {

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java
 Sat Aug 15 11:57:57 2015
@@ -72,21 +72,12 @@ public final class HSSFConditionalFormat
 
     private HSSFFontFormatting getFontFormatting(boolean create) {
         FontFormatting fontFormatting = cfRuleRecord.getFontFormatting();
-        if ( fontFormatting != null)
-        {
-            cfRuleRecord.setFontFormatting(fontFormatting);
-            return new HSSFFontFormatting(cfRuleRecord, workbook);
-        }
-        else if( create )
-        {
+        if (fontFormatting == null) {
+            if (!create) return null;
             fontFormatting = new FontFormatting();
             cfRuleRecord.setFontFormatting(fontFormatting);
-            return new HSSFFontFormatting(cfRuleRecord, workbook);
-        }
-        else
-        {
-            return null;
         }
+        return new HSSFFontFormatting(cfRuleRecord, workbook);
     }
 
     /**
@@ -106,22 +97,14 @@ public final class HSSFConditionalFormat
 
     private HSSFBorderFormatting getBorderFormatting(boolean create) {
         BorderFormatting borderFormatting = cfRuleRecord.getBorderFormatting();
-        if ( borderFormatting != null)
-        {
-            cfRuleRecord.setBorderFormatting(borderFormatting);
-            return new HSSFBorderFormatting(cfRuleRecord, workbook);
-        }
-        else if( create )
-        {
+        if (borderFormatting == null) {
+            if (!create) return null;
             borderFormatting = new BorderFormatting();
             cfRuleRecord.setBorderFormatting(borderFormatting);
-            return new HSSFBorderFormatting(cfRuleRecord, workbook);
-        }
-        else
-        {
-            return null;
         }
+        return new HSSFBorderFormatting(cfRuleRecord, workbook);
     }
+
     /**
      * @return - border formatting object  if defined,  <code>null</code> 
otherwise
      */
@@ -137,24 +120,14 @@ public final class HSSFConditionalFormat
         return getBorderFormatting(true);
     }
 
-    private HSSFPatternFormatting getPatternFormatting(boolean create)
-    {
+    private HSSFPatternFormatting getPatternFormatting(boolean create) {
         PatternFormatting patternFormatting = 
cfRuleRecord.getPatternFormatting();
-        if ( patternFormatting != null)
-        {
-            cfRuleRecord.setPatternFormatting(patternFormatting);
-            return new HSSFPatternFormatting(cfRuleRecord, workbook);
-        }
-        else if( create )
-        {
+        if (patternFormatting == null) {
+            if (!create) return null;
             patternFormatting = new PatternFormatting();
             cfRuleRecord.setPatternFormatting(patternFormatting);
-            return new HSSFPatternFormatting(cfRuleRecord, workbook);
-        }
-        else
-        {
-            return null;
         }
+        return new HSSFPatternFormatting(cfRuleRecord, workbook);
     }
 
     /**
@@ -176,21 +149,17 @@ public final class HSSFConditionalFormat
     
     private HSSFDataBarFormatting getDataBarFormatting(boolean create) {
         CFRule12Record cfRule12Record = getCFRule12Record(create);
+        if (cfRule12Record == null) return null;
+        
         DataBarFormatting databarFormatting = 
cfRule12Record.getDataBarFormatting();
-        if (databarFormatting != null)
-        {
-            return new HSSFDataBarFormatting(cfRule12Record, sheet);
-        }
-        else if( create )
-        {
-            databarFormatting = cfRule12Record.createDataBarFormatting();
-            return new HSSFDataBarFormatting(cfRule12Record, sheet);
-        }
-        else
-        {
-            return null;
+        if (databarFormatting == null) {
+            if (!create) return null;
+            cfRule12Record.createDataBarFormatting();
         }
+        
+        return new HSSFDataBarFormatting(cfRule12Record, sheet);
     }
+    
     /**
      * @return databar / data-bar formatting object if defined, 
<code>null</code> otherwise
      */
@@ -207,21 +176,16 @@ public final class HSSFConditionalFormat
     
     private HSSFIconMultiStateFormatting getMultiStateFormatting(boolean 
create) {
         CFRule12Record cfRule12Record = getCFRule12Record(create);
+        if (cfRule12Record == null) return null;
+        
         IconMultiStateFormatting iconFormatting = 
cfRule12Record.getMultiStateFormatting();
-        if (iconFormatting != null)
-        {
-            return new HSSFIconMultiStateFormatting(cfRule12Record, sheet);
-        }
-        else if( create )
-        {
-            iconFormatting = cfRule12Record.createMultiStateFormatting();
-            return new HSSFIconMultiStateFormatting(cfRule12Record, sheet);
-        }
-        else
-        {
-            return null;
+        if (iconFormatting == null) {
+            if (!create) return null;
+            cfRule12Record.createMultiStateFormatting();
         }
+        return new HSSFIconMultiStateFormatting(cfRule12Record, sheet);
     }
+    
     /**
      * @return icon / multi-state formatting object if defined, 
<code>null</code> otherwise
      */
@@ -238,21 +202,17 @@ public final class HSSFConditionalFormat
     
     private HSSFColorScaleFormatting getColorScaleFormatting(boolean create) {
         CFRule12Record cfRule12Record = getCFRule12Record(create);
+        if (cfRule12Record == null) return null;
+        
         ColorGradientFormatting colorFormatting = 
cfRule12Record.getColorGradientFormatting();
-        if (colorFormatting != null)
-        {
-            return new HSSFColorScaleFormatting(cfRule12Record, sheet);
-        }
-        else if( create )
-        {
-            colorFormatting = cfRule12Record.createColorGradientFormatting();
-            return new HSSFColorScaleFormatting(cfRule12Record, sheet);
-        }
-        else
-        {
-            return null;
+        if (colorFormatting == null) {
+            if (!create) return null;
+            cfRule12Record.createColorGradientFormatting();
         }
+
+        return new HSSFColorScaleFormatting(cfRule12Record, sheet);
     }
+    
     /**
      * @return color scale / gradient formatting object if defined, 
<code>null</code> otherwise
      */

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFName.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFName.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFName.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFName.java Sat Aug 15 
11:57:57 2015
@@ -148,7 +148,6 @@ public final class HSSFName implements N
         
         // Update our comment, if there is one
         if(_commentRec != null) {
-           String oldName = _commentRec.getNameText();
            _commentRec.setNameText(nameName);
            _book.getWorkbook().updateNameCommentRecordCache(_commentRec);
         }

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Sat Aug 15 
11:57:57 2015
@@ -36,7 +36,6 @@ import org.apache.poi.hssf.record.Drawin
 import org.apache.poi.hssf.record.EscherAggregate;
 import org.apache.poi.hssf.record.ExtendedFormatRecord;
 import org.apache.poi.hssf.record.NameRecord;
-import org.apache.poi.hssf.record.NoteRecord;
 import org.apache.poi.hssf.record.Record;
 import org.apache.poi.hssf.record.RowRecord;
 import org.apache.poi.hssf.record.SCLRecord;
@@ -1448,11 +1447,8 @@ public final class HSSFSheet implements
             return;
         }
 
-        NoteRecord[] noteRecs;
         if (moveComments) {
-            noteRecs = _sheet.getNoteRecords();
-        } else {
-            noteRecs = NoteRecord.EMPTY_ARRAY;
+            _sheet.getNoteRecords();
         }
 
         shiftMerged(startRow, endRow, n, true);

Modified: poi/trunk/src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java Sat 
Aug 15 11:57:57 2015
@@ -95,8 +95,7 @@ public class DataSpaceMapUtils {
         }
         
         public DataSpaceMap(LittleEndianInput is) {
-            @SuppressWarnings("unused")
-            int length = is.readInt();
+            /*int length = */ is.readInt();
             int entryCount = is.readInt();
             entries = new DataSpaceMapEntry[entryCount];
             for (int i=0; i<entryCount; i++) {
@@ -125,8 +124,7 @@ public class DataSpaceMapUtils {
         }
         
         public DataSpaceMapEntry(LittleEndianInput is) {
-            @SuppressWarnings("unused")
-            int length = is.readInt();
+            /*int length = */ is.readInt();
             int referenceComponentCount = is.readInt();
             referenceComponentType = new int[referenceComponentCount];
             referenceComponent = new String[referenceComponentCount];
@@ -158,8 +156,7 @@ public class DataSpaceMapUtils {
         }
         
         public DataSpaceDefinition(LittleEndianInput is) {
-            @SuppressWarnings("unused")
-            int headerLength = is.readInt();
+            /* int headerLength = */ is.readInt();
             int transformReferenceCount = is.readInt();
             transformer = new String[transformReferenceCount];
             for (int i=0; i<transformReferenceCount; i++) {
@@ -230,8 +227,7 @@ public class DataSpaceMapUtils {
         }
         
         public TransformInfoHeader(LittleEndianInput is) {
-            @SuppressWarnings("unused")
-            int length = is.readInt();
+            /* int length = */ is.readInt();
             transformType = is.readInt();
             transformerId = readUnicodeLPP4(is);
             transformerName = readUnicodeLPP4(is);

Modified: 
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDecryptor.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDecryptor.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDecryptor.java 
(original)
+++ 
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDecryptor.java 
Sat Aug 15 11:57:57 2015
@@ -197,7 +197,6 @@ public class CryptoAPIDecryptor extends
      * 
      * @see <a 
href="http://msdn.microsoft.com/en-us/library/dd943321(v=office.12).aspx">2.3.5.4
 RC4 CryptoAPI Encrypted Summary Stream</a>
      */
-    @SuppressWarnings("unused")
     public InputStream getDataStream(DirectoryNode dir)
     throws IOException, GeneralSecurityException {
         NPOIFSFileSystem fsOut = new NPOIFSFileSystem();
@@ -209,7 +208,7 @@ public class CryptoAPIDecryptor extends
         SeekableByteArrayInputStream sbis = new 
SeekableByteArrayInputStream(bos.toByteArray());
         LittleEndianInputStream leis = new LittleEndianInputStream(sbis);
         int streamDescriptorArrayOffset = (int) leis.readUInt();
-        int streamDescriptorArraySize = (int) leis.readUInt();
+        /* int streamDescriptorArraySize = (int) */ leis.readUInt();
         sbis.skip(streamDescriptorArrayOffset - 8);
         sbis.setBlock(0);
         int encryptedStreamDescriptorCount = (int) leis.readUInt();
@@ -222,7 +221,7 @@ public class CryptoAPIDecryptor extends
             entry.block = leis.readUShort();
             int nameSize = leis.readUByte();
             entry.flags = leis.readUByte();
-            boolean isStream = 
StreamDescriptorEntry.flagStream.isSet(entry.flags);
+            // boolean isStream = 
StreamDescriptorEntry.flagStream.isSet(entry.flags);
             entry.reserved2 = leis.readInt();
             entry.streamName = StringUtil.readUnicodeLE(leis, nameSize);
             leis.readShort();

Modified: 
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptionInfoBuilder.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptionInfoBuilder.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptionInfoBuilder.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptionInfoBuilder.java
 Sat Aug 15 11:57:57 2015
@@ -35,11 +35,10 @@ public class CryptoAPIEncryptionInfoBuil
     /**
      * initialize the builder from a stream
      */
-    @SuppressWarnings("unused")
     public void initialize(EncryptionInfo info, LittleEndianInput dis)
     throws IOException {
         this.info = info;
-        int hSize = dis.readInt();
+        /* int hSize = */ dis.readInt();
         header = new CryptoAPIEncryptionHeader(dis);
         verifier = new CryptoAPIEncryptionVerifier(dis, header);
         decryptor = new CryptoAPIDecryptor(this);

Modified: 
poi/trunk/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptionInfoBuilder.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptionInfoBuilder.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptionInfoBuilder.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptionInfoBuilder.java
 Sat Aug 15 11:57:57 2015
@@ -40,8 +40,7 @@ public class StandardEncryptionInfoBuild
     public void initialize(EncryptionInfo info, LittleEndianInput dis) throws 
IOException {
         this.info = info;
         
-        @SuppressWarnings("unused")
-        int hSize = dis.readInt();
+        /* int hSize = */ dis.readInt();
         header = new StandardEncryptionHeader(dis);
         verifier = new StandardEncryptionVerifier(dis, header);
 

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java (original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java Sat Aug 15 
11:57:57 2015
@@ -101,10 +101,10 @@ public class DrawTextParagraph<T extends
             indent -= leftMargin;
         }
         
-        Double rightMargin = paragraph.getRightMargin();
-        if (rightMargin == null) {
-            rightMargin = 0d;
-        }
+//        Double rightMargin = paragraph.getRightMargin();
+//        if (rightMargin == null) {
+//            rightMargin = 0d;
+//        }
 
         //The vertical line spacing
         Double spacing = paragraph.getLineSpacing();

Modified: poi/trunk/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java Sat 
Aug 15 11:57:57 2015
@@ -63,7 +63,7 @@ public class PresetGeometries extends Li
         XMLEventReader staxReader = staxFactory.createXMLEventReader(is);
         XMLEventReader staxFiltRd = 
staxFactory.createFilteredReader(staxReader, startElementFilter);
         // ignore StartElement:
-        XMLEvent evDoc = staxFiltRd.nextEvent();
+        /* XMLEvent evDoc = */ staxFiltRd.nextEvent();
         // JAXB:
         JAXBContext jaxbContext = JAXBContext.newInstance(BINDING_PACKAGE);
         Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Address.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Address.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Address.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Address.java Sat Aug 
15 11:57:57 2015
@@ -69,14 +69,14 @@ public class Address implements Function
                     throw new EvaluationException(ErrorEval.VALUE_INVALID);
             }
 
-            boolean a1;
-            if(args.length > 3){
-                ValueEval ve = OperandResolver.getSingleValue(args[3], 
srcRowIndex, srcColumnIndex);
-                // TODO R1C1 style is not yet supported
-                a1 = ve == MissingArgEval.instance ? true : 
OperandResolver.coerceValueToBoolean(ve, false);
-            } else {
-                a1 = true;
-            }
+//            boolean a1;
+//            if(args.length > 3){
+//                ValueEval ve = OperandResolver.getSingleValue(args[3], 
srcRowIndex, srcColumnIndex);
+//                // TODO R1C1 style is not yet supported
+//                a1 = ve == MissingArgEval.instance ? true : 
OperandResolver.coerceValueToBoolean(ve, false);
+//            } else {
+//                a1 = true;
+//            }
 
             String sheetName;
             if(args.length == 5){

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java
 Sat Aug 15 11:57:57 2015
@@ -68,7 +68,7 @@ public class Office2010SignatureFacet ex
         }
         UnsignedSignaturePropertiesType unsignedSigProps = 
unsignedProps.getUnsignedSignatureProperties();
         if (unsignedSigProps == null) {
-            unsignedSigProps = 
unsignedProps.addNewUnsignedSignatureProperties();
+            /* unsignedSigProps = */ 
unsignedProps.addNewUnsignedSignatureProperties();
         }
         
         Node n = document.importNode(qualProps.getDomNode().getFirstChild(), 
true);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java Sat Aug 15 
11:57:57 2015
@@ -187,7 +187,7 @@ public final class XmlSort
      * The constructor accepts an argument indicating whether the comparison 
order is the same as
      * the lexicographic order of the strings or the reverse.
      */
-    public static final class QNameComparator implements Comparator
+    public static final class QNameComparator implements Comparator<XmlCursor>
     {
         public static final int ASCENDING = 1;
         public static final int DESCENDING = 2;
@@ -202,10 +202,7 @@ public final class XmlSort
                     "comparison orders");
         }
 
-        public int compare(Object o, Object o1)
-        {
-            XmlCursor cursor1 = (XmlCursor) o;
-            XmlCursor cursor2 = (XmlCursor) o1;
+        public int compare(XmlCursor cursor1, XmlCursor cursor2) {
             QName qname1 = cursor1.getName();
             QName qname2 = cursor2.getName();
             int qnameComparisonRes = 
qname1.getNamespaceURI().compareTo(qname2.getNamespaceURI());

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java 
(original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java 
Sat Aug 15 11:57:57 2015
@@ -21,7 +21,6 @@ package org.apache.poi.xslf.usermodel;
 
 import org.apache.poi.sl.usermodel.ConnectorShape;
 import org.apache.poi.util.Beta;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties;
 import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
 import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D;
 import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
@@ -44,7 +43,6 @@ public class XSLFConnectorShape extends
     /**
      * @param shapeId 1-based shapeId
      */
-    @SuppressWarnings("unused")
     static CTConnector prototype(int shapeId) {
         CTConnector ct = CTConnector.Factory.newInstance();
         CTConnectorNonVisual nvSpPr = ct.addNewNvCxnSpPr();
@@ -57,7 +55,7 @@ public class XSLFConnectorShape extends
         CTPresetGeometry2D prst = spPr.addNewPrstGeom();
         prst.setPrst(STShapeType.LINE);
         prst.addNewAvLst();
-        CTLineProperties ln = spPr.addNewLn();
+        /* CTLineProperties ln = */ spPr.addNewLn();
         return ct;
     }
 

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java 
(original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java 
Sat Aug 15 11:57:57 2015
@@ -23,7 +23,12 @@ import javax.xml.namespace.QName;
 
 import org.apache.poi.util.Internal;
 import org.apache.xmlbeans.XmlCursor;
-import org.openxmlformats.schemas.drawingml.x2006.main.*;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObjectData;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D;
 import 
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGraphicalObjectFrame;
 import 
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGraphicalObjectFrameNonVisual;
 import 
org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
@@ -79,7 +84,7 @@ public final class XSSFGraphicFrame exte
                        offPoint.setX(0);
                        offPoint.setY(0);
 
-                       CTGraphicalObject graphic = 
graphicFrame.addNewGraphic();
+                       /* CTGraphicalObject graphic = */ 
graphicFrame.addNewGraphic();
 
                        prototype = graphicFrame;
                }

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/NewOleFile.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/NewOleFile.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/NewOleFile.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/NewOleFile.java 
Sat Aug 15 11:57:57 2015
@@ -94,7 +94,6 @@ public final class NewOleFile extends Ra
         int counter = 0;
         for(int x = 0; x < _num_bbd_blocks; x++)
         {
-            byte[] bigBlock = new byte[512];
             int offset = (_bbd_list[x] + 1) * 512;
             seek(offset);
             for(int y = 0; y < 128; y++)
@@ -107,17 +106,12 @@ public final class NewOleFile extends Ra
         initializePropertySets(rootChain);
 
     }
-    @SuppressWarnings("unused")
-    public static void main(String args[])
-    {
-      try
-      {
-          NewOleFile file = new NewOleFile(args[0], "r");
-      }
-      catch(Exception e)
-      {
-      }
+
+    public static void main(String args[]) throws Exception {
+        NewOleFile nof = new NewOleFile(args[0], "r");
+        nof.close();
     }
+    
     protected int[] readChain(int[] blockChain, int startBlock) {
 
         int[] tempChain = new int[blockChain.length];

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java 
Sat Aug 15 11:57:57 2015
@@ -784,7 +784,6 @@ public final class WordDocument {
 
     return context.getFontMetrics(font);
   }*/
-  @SuppressWarnings("unused")
   private String createRegion(boolean before, HeaderFooter header, SEP sep, 
String name)
   {
     if(header.isEmpty())
@@ -820,8 +819,8 @@ public final class WordDocument {
       sep._dyaBottom = Math.max(extent*20, sep._dyaBottom);
     }
 
-    int marginLeft = sep._dxaLeft/20;
-    int marginRight = sep._dxaRight/20;
+    //int marginLeft = sep._dxaLeft/20;
+    //int marginRight = sep._dxaRight/20;
 
     return "<fo:region-" + where + " display-align=\"" + align + "\" extent=\""
              + extent + "pt\" "+region+"/>";

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFDocument.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFDocument.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFDocument.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFDocument.java Sat 
Aug 15 11:57:57 2015
@@ -33,11 +33,11 @@ public final class HDFDocument
   public HDFDocument(InputStream in, HDFParsingListener listener) throws 
IOException
   {
     EventBridge eb = new EventBridge(listener);
-    HDFObjectFactory factory = new HDFObjectFactory(in, eb);
+    /* HDFObjectFactory factory = */ new HDFObjectFactory(in, eb);
   }
   public HDFDocument(InputStream in) throws IOException
   {
     _model = new HDFObjectModel();
-    HDFObjectFactory factory = new HDFObjectFactory(in, _model);
+    /* HDFObjectFactory factory = */ new HDFObjectFactory(in, _model);
   }
 }

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFObjectFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFObjectFactory.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFObjectFactory.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/HDFObjectFactory.java 
Sat Aug 15 11:57:57 2015
@@ -68,19 +68,10 @@ public final class HDFObjectFactory {
     byte[] _tableBuffer;
 
 
-    @SuppressWarnings("unused")
-    public static void main(String args[])
-    {
-      try
-      {
-        HDFObjectFactory f = new HDFObjectFactory(new 
FileInputStream("c:\\test.doc"));
-        int k = 0;
-      }
-      catch(Exception t)
-      {
-        t.printStackTrace();
-      }
+    public static void main(String args[]) throws Exception {
+        new HDFObjectFactory(new FileInputStream("c:\\test.doc"));
     }
+    
     /** Creates a new instance of HDFObjectFactory
      *
      * @param istream The InputStream that is the Word document
@@ -133,19 +124,23 @@ public final class HDFObjectFactory {
         List<FileInformationBlock> results = new 
ArrayList<FileInformationBlock>(1);
 
         //do Ole stuff
-        POIFSFileSystem filesystem = new POIFSFileSystem(istream);
-
-        DocumentEntry headerProps =
-            (DocumentEntry)filesystem.getRoot().getEntry("WordDocument");
-
-        byte[] mainDocument = new byte[headerProps.getSize()];
-        
filesystem.createDocumentInputStream("WordDocument").read(mainDocument);
-
-        FileInformationBlock fib = new FileInformationBlock(mainDocument);
-
-
-        results.add(fib);
-        return results;
+        POIFSFileSystem filesystem = null;
+        try {
+            filesystem = new POIFSFileSystem(istream);
+            DocumentEntry headerProps =
+                (DocumentEntry)filesystem.getRoot().getEntry("WordDocument");
+    
+            byte[] mainDocument = new byte[headerProps.getSize()];
+            
filesystem.createDocumentInputStream("WordDocument").read(mainDocument);
+    
+            FileInformationBlock fib = new FileInformationBlock(mainDocument);
+    
+    
+            results.add(fib);
+            return results;
+        } finally {
+            if (filesystem != null) filesystem.close();
+        }
     }
 
 
@@ -477,7 +472,7 @@ public final class HDFObjectFactory {
     {
 
       int ccpText = _fib.getCcpText();
-      int ccpFtn = _fib.getCcpFtn();
+      // int ccpFtn = _fib.getCcpFtn();
 
       //sections
       int fcMin = _fib.getFcMin();

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java 
Sat Aug 15 11:57:57 2015
@@ -329,15 +329,14 @@ public final class StyleSheet implements
                newCHP.setIco((byte)0);
                break;
           case 0x33:
-               try
-               {
-                   newCHP = (CharacterProperties)oldCHP.clone();
-               }
-               catch(CloneNotSupportedException e)
-               {
-                   //do nothing
-               }
-               return;
+               // ... this code has no effect ...
+               //  try {
+               //      newCHP = (CharacterProperties)oldCHP.clone();
+               //  }
+               //  catch(CloneNotSupportedException e) {
+               //      //do nothing
+               //  }
+              break;
           case 0x34:
                break;
           case 0x35:

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java Sat Aug 
15 11:57:57 2015
@@ -73,8 +73,7 @@ public final class CompressedRTF extends
       compressedSize = LittleEndian.readInt(src);
       decompressedSize = LittleEndian.readInt(src);
       int compressionType = LittleEndian.readInt(src);
-      @SuppressWarnings("unused")
-      int dataCRC = LittleEndian.readInt(src);
+      /* int dataCRC = */ LittleEndian.readInt(src);
       
       // TODO - Handle CRC checking on the output side
       

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java 
Sat Aug 15 11:57:57 2015
@@ -301,11 +301,8 @@ public final class HSLFSlideShow impleme
                // Slides or Notes, and possibly even other odd stuff....
                // About the only thing you can say is that the master details 
are in
                // the first SLWT.
-               SlideAtomsSet[] masterSets = new SlideAtomsSet[0];
                if (masterSLWT != null) {
-                       masterSets = masterSLWT.getSlideAtomsSets();
-
-                       for (SlideAtomsSet sas : masterSets) {
+                       for (SlideAtomsSet sas : 
masterSLWT.getSlideAtomsSets()) {
                                Record r = getCoreRecordForSAS(sas);
                                int sheetNo = 
sas.getSlidePersistAtom().getSlideIdentifier();
                                if (r instanceof 
org.apache.poi.hslf.record.Slide) {
@@ -327,27 +324,27 @@ public final class HSLFSlideShow impleme
                // Start by finding the notes records to go with the entries in
                // notesSLWT
                org.apache.poi.hslf.record.Notes[] notesRecords;
-               SlideAtomsSet[] notesSets = new SlideAtomsSet[0];
                Map<Integer,Integer> slideIdToNotes = new 
HashMap<Integer,Integer>();
                if (notesSLWT == null) {
                        // None
                        notesRecords = new org.apache.poi.hslf.record.Notes[0];
                } else {
                        // Match up the records and the SlideAtomSets
-                       notesSets = notesSLWT.getSlideAtomsSets();
                        List<org.apache.poi.hslf.record.Notes> notesRecordsL = 
                           new ArrayList<org.apache.poi.hslf.record.Notes>();
-                       for (int i = 0; i < notesSets.length; i++) {
+                       int idx = -1;
+                       for (SlideAtomsSet notesSet : 
notesSLWT.getSlideAtomsSets()) {
+                           idx++;
                                // Get the right core record
-                               Record r = getCoreRecordForSAS(notesSets[i]);
+                               Record r = getCoreRecordForSAS(notesSet);
+                SlidePersistAtom spa = notesSet.getSlidePersistAtom();
 
+                               String loggerLoc = "A Notes SlideAtomSet at 
"+idx+" said its record was at refID "+spa.getRefID();
+                                       
                                // Ensure it really is a notes record
                                if (r == null || r instanceof 
org.apache.poi.hslf.record.Notes) {
                                    if (r == null) {
-                           logger.log(POILogger.WARN, "A Notes SlideAtomSet at 
" + i
-                                   + " said its record was at refID "
-                                   + 
notesSets[i].getSlidePersistAtom().getRefID()
-                                   + ", but that record didn't exist - record 
ignored.");
+                           logger.log(POILogger.WARN, loggerLoc+", but that 
record didn't exist - record ignored.");
                                    }
                                    // we need to add also null-records, 
otherwise the index references to other existing
                                    // don't work anymore
@@ -355,14 +352,10 @@ public final class HSLFSlideShow impleme
                                        notesRecordsL.add(notesRecord);
 
                                        // Record the match between slide id 
and these notes
-                                       SlidePersistAtom spa = 
notesSets[i].getSlidePersistAtom();
                                        int slideId = spa.getSlideIdentifier();
-                                       slideIdToNotes.put(slideId, i);
+                                       slideIdToNotes.put(slideId, idx);
                                } else {
-                                       logger.log(POILogger.ERROR, "A Notes 
SlideAtomSet at " + i
-                                                       + " said its record was 
at refID "
-                                                       + 
notesSets[i].getSlidePersistAtom().getRefID()
-                                                       + ", but that was 
actually a " + r);
+                                       logger.log(POILogger.ERROR, 
loggerLoc+", but that was actually a " + r);
                                }
                        }
                        notesRecords = new 
org.apache.poi.hslf.record.Notes[notesRecordsL.size()];

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
 Sat Aug 15 11:57:57 2015
@@ -221,7 +221,7 @@ public class HSLFSlideShowEncrypted {
                 cipher.doFinal(pictstream, offset, 8, pictstream, offset);
                 recInst = 
fieldRecInst.getValue(LittleEndian.getUShort(pictstream, offset));
                 recType = LittleEndian.getUShort(pictstream, offset+2);
-                rlen = (int)LittleEndian.getUInt(pictstream, offset+4);
+                // rlen = (int)LittleEndian.getUInt(pictstream, offset+4);
                 offset += 8;
             }
 
@@ -299,7 +299,7 @@ public class HSLFSlideShowEncrypted {
                 // update header data
                 recInst = 
fieldRecInst.getValue(LittleEndian.getUShort(pictstream, offset));
                 recType = LittleEndian.getUShort(pictstream, offset+2);
-                rlen = (int)LittleEndian.getUInt(pictstream, offset+4);
+                // rlen = (int) LittleEndian.getUInt(pictstream, offset+4);
                 cipher.doFinal(pictstream, offset, 8, pictstream, offset);
                 offset += 8;
             }

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=1696038&r1=1696037&r2=1696038&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 Aug 15 11:57:57 2015
@@ -752,10 +752,10 @@ public final class HSLFTextParagraph imp
 
         RecordContainer _txtbox = headerAtom.getParentRecord();
         Record[] cr = _txtbox.getChildRecords();
-        int headerIdx = -1, textIdx = -1, styleIdx = -1;
+        int /* headerIdx = -1, */ textIdx = -1, styleIdx = -1;
         for (int i = 0; i < cr.length; i++) {
             Record r = cr[i];
-            if (r == headerAtom) headerIdx = i;
+            if (r == headerAtom) ; // headerIdx = i;
             else if (r == oldRecord || r == newRecord) textIdx = i;
             else if (r == styleAtom) styleIdx = i;
         }
@@ -763,7 +763,7 @@ public final class HSLFTextParagraph imp
         if (textIdx == -1) {
             // the old record was never registered, ignore it
             _txtbox.addChildAfter(newRecord, headerAtom);
-            textIdx = headerIdx + 1;
+            // textIdx = headerIdx + 1;
         } else {
             // swap not appropriated records - noop if unchanged
             cr[textIdx] = newRecord;

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java 
(original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java 
Sat Aug 15 11:57:57 2015
@@ -112,7 +112,7 @@ public abstract class PropertiesChunk ex
            return null;
        }
        if (val instanceof ChunkBasedPropertyValue) {
-           ChunkBasedPropertyValue cval = (ChunkBasedPropertyValue)val;
+           // ChunkBasedPropertyValue cval = (ChunkBasedPropertyValue)val;
            // TODO Lookup
            return Collections.emptyList();
        } else {

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=1696038&r1=1696037&r2=1696038&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 Aug 
15 11:57:57 2015
@@ -347,7 +347,7 @@ public final class HWPFDocument extends
     _ft = new FontTable(_tableStream, _fib.getFcSttbfffn(), 
_fib.getLcbSttbfffn());
 
         int listOffset = _fib.getFcPlfLst();
-        int lfoOffset = _fib.getFcPlfLfo();
+        // int lfoOffset = _fib.getFcPlfLfo();
         if ( listOffset != 0 && _fib.getLcbPlfLst() != 0 )
         {
             _lt = new ListTables( _tableStream, listOffset, _fib.getFcPlfLfo(),

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=1696038&r1=1696037&r2=1696038&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 Aug 15 11:57:57 2015
@@ -40,8 +40,8 @@ public final class StyleDescription impl
     
   private final static int PARAGRAPH_STYLE = 1;
   private final static int CHARACTER_STYLE = 2;
-  private final static int TABLE_STYLE = 3;
-  private final static int NUMBERING_STYLE = 4;
+  // private final static int TABLE_STYLE = 3;
+  // private final static int NUMBERING_STYLE = 4;
 
   private int _baseLength;
   private StdfBase _stdfBase;
@@ -86,7 +86,7 @@ public final class StyleDescription impl
         if ( readStdfPost2000 )
         {
             _stdfPost2000 = new StdfPost2000( std, offset );
-            offset += StdfPost2000.getSize();
+            // offset += StdfPost2000.getSize();
         }
 
       //first byte(s) of variable length section of std is the length of the

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java?rev=1696038&r1=1696037&r2=1696038&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java Sat 
Aug 15 11:57:57 2015
@@ -42,10 +42,10 @@ import org.apache.poi.util.LittleEndian;
 public final class StyleSheet implements HDFType {
 
   public static final int NIL_STYLE = 4095;
-  private static final int PAP_TYPE = 1;
-  private static final int CHP_TYPE = 2;
-  private static final int SEP_TYPE = 4;
-  private static final int TAP_TYPE = 5;
+//  private static final int PAP_TYPE = 1;
+//  private static final int CHP_TYPE = 2;
+//  private static final int SEP_TYPE = 4;
+//  private static final int TAP_TYPE = 5;
 
     @Deprecated
     private final static ParagraphProperties NIL_PAP = new 
ParagraphProperties();
@@ -144,7 +144,7 @@ public final class StyleSheet implements
 
     _stshif.setCstd( _styleDescriptions.length );
     _stshif.serialize( buf, offset );
-    offset += Stshif.getSize();
+    // offset += Stshif.getSize();
 
     out.write(buf);
 
@@ -156,7 +156,7 @@ public final class StyleSheet implements
           byte[] std = _styleDescriptions[x].toByteArray();
 
           // adjust the size so it is always on a word boundary
-          LittleEndian.putShort(sizeHolder, (short)((std.length) + (std.length 
% 2)));
+          LittleEndian.putShort(sizeHolder, 0, (short)((std.length) + 
(std.length % 2)));
           out.write(sizeHolder);
           out.write(std);
 



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

Reply via email to