You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/06/15 03:26:58 UTC

svn commit: r1748483 - in /poi/trunk: ./ src/java/org/apache/poi/hssf/extractor/ src/java/org/apache/poi/hssf/model/ src/java/org/apache/poi/hssf/util/ src/java/org/apache/poi/util/ src/scratchpad/src/org/apache/poi/hdgf/chunks/ src/scratchpad/src/org/...

Author: onealj
Date: Wed Jun 15 03:26:58 2016
New Revision: 1748483

URL: http://svn.apache.org/viewvc?rev=1748483&view=rev
Log:
bug 59170: remove deprecated methods

Removed:
    poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddress.java
    poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddressList.java
Modified:
    poi/trunk/.project
    poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
    poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
    poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java
    poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java
    poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddress8Bit.java
    poi/trunk/src/java/org/apache/poi/util/LittleEndian.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ExControlAtom.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmUtils.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

Modified: poi/trunk/.project
URL: http://svn.apache.org/viewvc/poi/trunk/.project?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/.project (original)
+++ poi/trunk/.project Wed Jun 15 03:26:58 2016
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>ApachePOI</name>
+	<name>ApachePOI-bug57840</name>
 	<comment></comment>
 	<projects>
 	</projects>

Modified: poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java Wed Jun 15 03:26:58 2016
@@ -65,15 +65,6 @@ public class EventBasedExcelExtractor ex
     boolean _includeSheetNames = true;
     boolean _formulasNotResults = false;
 
-    /**
-     * @deprecated Use {@link #EventBasedExcelExtractor(DirectoryNode)} instead
-     */
-    @Deprecated
-    public EventBasedExcelExtractor( DirectoryNode dir, POIFSFileSystem fs )
-    {
-        this( dir );
-    }
-
     public EventBasedExcelExtractor( DirectoryNode dir )
     {
         super( (POIDocument)null );

Modified: poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java Wed Jun 15 03:26:58 2016
@@ -69,14 +69,7 @@ public class ExcelExtractor extends POIO
 	public ExcelExtractor(POIFSFileSystem fs) throws IOException {
 		this(fs.getRoot());
 	}
-	/**
-     * @deprecated Use {@link #ExcelExtractor(DirectoryNode)} instead
-     */
-    @Deprecated
-    public ExcelExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
-        this( dir );
-    }
-    public ExcelExtractor(DirectoryNode dir) throws IOException {
+	public ExcelExtractor(DirectoryNode dir) throws IOException {
 		this(new HSSFWorkbook(dir, true));
 	}
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java Wed Jun 15 03:26:58 2016
@@ -780,25 +780,6 @@ public final class InternalSheet {
     }
 
     /**
-     * Get all the value records (from LOC). Records will be returned from the first
-     *  record (starting at LOC) which is a value record.
-     *
-     * <P>
-     * This method is "loc" sensitive.  Meaning you need to set LOC to where you
-     * want it to start searching.  If you don't know do this: setLoc(getDimsLoc).
-     * When adding several rows you can just start at the last one by leaving loc
-     * at what this sets it to.  For this method, set loc to dimsloc to start with,
-     * subsequent calls will return values in (physical) sequence or NULL when you get to the end.
-     *
-     * @return Array of CellValueRecordInterface representing the remaining value records
-     * @deprecated use {@link #getCellValueIterator()} instead
-     */
-    @Deprecated
-    public CellValueRecordInterface[] getValueRecords() {
-        return _rowsAggregate.getValueRecords();
-    }
-
-    /**
      * get the NEXT RowRecord (from LOC).  The first record that is a Row record
      * (starting at LOC) will be returned.
      * <P>

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java Wed Jun 15 03:26:58 2016
@@ -488,14 +488,6 @@ final class LinkTable {
         return _externSheetRecord.getLastSheetIndexFromRefIndex(extRefIndex);
     }
 
-	/**
-	 * @deprecated Was prevously used for removing sheets, which we now do differently 
-	 */
-	@Deprecated
-    public void updateIndexToInternalSheet(int extRefIndex, int offset) {
-        _externSheetRecord.adjustIndex(extRefIndex, offset);
-    }
-
 	public void removeSheet(int sheetIdx) {
 		_externSheetRecord.removeSheet(sheetIdx);
 	}

Modified: poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddress8Bit.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddress8Bit.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddress8Bit.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/util/CellRangeAddress8Bit.java Wed Jun 15 03:26:58 2016
@@ -47,13 +47,6 @@ public final class CellRangeAddress8Bit
 		return in.readUShort();
 	}
 
-	/**
-	 * @deprecated use {@link #serialize(LittleEndianOutput)}
-	 */
-	public int serialize(int offset, byte[] data) {
-		serialize(new LittleEndianByteArrayOutputStream(data, offset, ENCODED_SIZE));
-		return ENCODED_SIZE;
-	}
 	public void serialize(LittleEndianOutput out) {
 		out.writeShort(getFirstRow());
 		out.writeShort(getLastRow());

Modified: poi/trunk/src/java/org/apache/poi/util/LittleEndian.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/LittleEndian.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/LittleEndian.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/LittleEndian.java Wed Jun 15 03:26:58 2016
@@ -302,22 +302,6 @@ public class LittleEndian implements Lit
     }
 
     /**
-     * get the unsigned value of a byte.
-     * 
-     * @param data
-     *            the byte array.
-     * @param offset
-     *            a starting offset into the byte array.
-     * @return the unsigned value of the byte as a 32 bit integer
-     * @deprecated Use {@link #getUByte(byte[], int)} instead
-     */
-    @Deprecated
-    public static int getUnsignedByte( byte[] data, int offset )
-    {
-        return data[offset] & 0xFF;
-    }
-
-    /**
      * get an unsigned short value from the beginning of a byte array
      * 
      * @param data
@@ -422,21 +406,6 @@ public class LittleEndian implements Lit
     }
 
     /**
-     * put an int value into beginning of a byte array
-     * 
-     * @param data
-     *            the byte array
-     * @param value
-     *            the int (32-bit) value
-     * @deprecated Use {@link #putInt(byte[], int, int)} instead
-     */
-    @Deprecated
-    public static void putInt( byte[] data, int value )
-    {
-        putInt( data, 0, value );
-    }
-
-    /**
      * put an int value into a byte array
      * 
      * @param data
@@ -537,21 +506,6 @@ public class LittleEndian implements Lit
     }
 
     /**
-     * put a short value into beginning of a byte array
-     * 
-     * @param data
-     *            the byte array
-     * @param value
-     *            the short (16-bit) value
-     * @deprecated Use {@link #putShort(byte[], int, short)} instead
-     */
-    @Deprecated
-    public static void putShort( byte[] data, short value )
-    {
-        putShort( data, 0, value );
-    }
-
-    /**
      * Put signed short into output stream
      * 
      * @param value
@@ -630,21 +584,6 @@ public class LittleEndian implements Lit
     }
 
     /**
-     * put an unsigned int value into beginning of a byte array
-     * 
-     * @param data
-     *            the byte array
-     * @param value
-     *            the int (32-bit) value
-     * @deprecated Use {@link #putUInt(byte[], int, long)} instead
-     */
-    @Deprecated
-    public static void putUInt( byte[] data, long value )
-    {
-        putUInt( data, 0, value );
-    }
-
-    /**
      * Put unsigned int into output stream
      * 
      * @param value

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java Wed Jun 15 03:26:58 2016
@@ -47,7 +47,7 @@ public abstract class ChunkHeader {
 			ch.unknown1 = (int)LittleEndian.getUInt(data, offset + 8);
 			ch.length   = (int)LittleEndian.getUInt(data, offset + 12);
 			ch.unknown2 = LittleEndian.getShort(data, offset + 16);
-			ch.unknown3 = (short)LittleEndian.getUnsignedByte(data, offset + 18);
+			ch.unknown3 = LittleEndian.getUByte(data, offset + 18);
 
 			return ch;
 		} else if(documentVersion == 5 || documentVersion == 4) {
@@ -55,8 +55,8 @@ public abstract class ChunkHeader {
 
 			ch.type = LittleEndian.getShort(data, offset + 0);
 			ch.id   = LittleEndian.getShort(data, offset + 2);
-			ch.unknown2 = (short)LittleEndian.getUnsignedByte(data, offset + 4);
-			ch.unknown3 = (short)LittleEndian.getUnsignedByte(data, offset + 5);
+			ch.unknown2 = LittleEndian.getUByte(data, offset + 4);
+			ch.unknown3 = LittleEndian.getUByte(data, offset + 5);
 			ch.unknown1 = LittleEndian.getShort(data, offset + 6);
 			ch.length   = (int)LittleEndian.getUInt(data, offset + 8);
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java Wed Jun 15 03:26:58 2016
@@ -66,7 +66,7 @@ public final class CString extends Recor
 	 * The meaning of the count is specific to the type of the parent record
 	 */
 	public void setOptions(int count) {
-		LittleEndian.putShort(_header, (short)count);
+		LittleEndian.putShort(_header, 0, (short)count);
 	}
 
 	/* *************** record code follows ********************** */

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ExControlAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ExControlAtom.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ExControlAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ExControlAtom.java Wed Jun 15 03:26:58 2016
@@ -110,7 +110,7 @@ public final class ExControlAtom extends
     public void writeOut(OutputStream out) throws IOException {
         out.write(_header);
         byte[] data = new byte[4];
-        LittleEndian.putInt(data, _id);
+        LittleEndian.putInt(data, 0, _id);
         out.write(data);
     }
 

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=1748483&r1=1748482&r2=1748483&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 Wed Jun 15 03:26:58 2016
@@ -511,7 +511,7 @@ public class CHPBinTable
       }
 
       byte[] intHolder = new byte[4];
-      LittleEndian.putInt(intHolder, pageNum++);
+      LittleEndian.putInt(intHolder, 0, pageNum++);
       bte.addProperty(new GenericPropertyNode(start, end, intHolder));
 
     }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java Wed Jun 15 03:26:58 2016
@@ -124,7 +124,7 @@ public final class CHPFormattedDiskPage
      */
     protected byte[] getGrpprl(int index)
     {
-        int chpxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * 4) + index));
+        int chpxOffset = 2 * LittleEndian.getUByte(_fkp, _offset + (((_crun + 1) * 4) + index));
 
         //optimization if offset == 0 use "Normal" style
         if(chpxOffset == 0)
@@ -132,7 +132,7 @@ public final class CHPFormattedDiskPage
             return new byte[0];
         }
 
-        int size = LittleEndian.getUnsignedByte(_fkp, _offset + chpxOffset);
+        int size = LittleEndian.getUByte(_fkp, _offset + chpxOffset);
 
         byte[] chpx = new byte[size];
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java Wed Jun 15 03:26:58 2016
@@ -97,7 +97,7 @@ public final class ComplexFileTable
         byte[] table = _tpt.writeTo( wordDocumentStream );
 
         byte[] numHolder = new byte[LittleEndian.INT_SIZE];
-        LittleEndian.putInt( numHolder, table.length );
+        LittleEndian.putInt( numHolder, 0, table.length );
         tableStream.write( numHolder );
         tableStream.write( table );
     }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java Wed Jun 15 03:26:58 2016
@@ -57,7 +57,7 @@ public final class Ffn
   {
     int offsetTmp = offset;
 
-    _cbFfnM1 = LittleEndian.getUnsignedByte(buf,offset);
+    _cbFfnM1 = LittleEndian.getUByte(buf,offset);
     offset += LittleEndian.BYTE_SIZE;
     _info = buf[offset];
     offset += LittleEndian.BYTE_SIZE;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java Wed Jun 15 03:26:58 2016
@@ -125,9 +125,9 @@ public final class FontTable
     public void writeTo( HWPFOutputStream tableStream ) throws IOException
     {
 	  byte[] buf = new byte[LittleEndian.SHORT_SIZE];
-	  LittleEndian.putShort(buf, _stringCount);
+	  LittleEndian.putShort(buf, 0, _stringCount);
 	  tableStream.write(buf);
-	  LittleEndian.putShort(buf, _extraDataSz);
+	  LittleEndian.putShort(buf, 0, _extraDataSz);
 	  tableStream.write(buf);
 
 	  for(int i = 0; i < _fontNames.length; i++)

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java Wed Jun 15 03:26:58 2016
@@ -58,7 +58,7 @@ public abstract class FormattedDiskPage
      */
     public FormattedDiskPage(byte[] documentStream, int offset)
     {
-        _crun = LittleEndian.getUnsignedByte(documentStream, offset + 511);
+        _crun = LittleEndian.getUByte(documentStream, offset + 511);
         _fkp = documentStream;
         _offset = offset;
     }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java Wed Jun 15 03:26:58 2016
@@ -38,7 +38,7 @@ public final class Hyphenation extends H
     public Hyphenation( short hres )
     {
         byte[] data = new byte[2];
-        LittleEndian.putShort( data, hres );
+        LittleEndian.putShort( data, 0, hres );
         fillFields( data, 0 );
     }
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java Wed Jun 15 03:26:58 2016
@@ -459,7 +459,7 @@ public class PAPBinTable
       }
 
       byte[] intHolder = new byte[4];
-      LittleEndian.putInt(intHolder, pageNum++);
+      LittleEndian.putInt(intHolder, 0, pageNum++);
       binTable.addProperty(new GenericPropertyNode(start, end, intHolder));
 
     }

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=1748483&r1=1748482&r2=1748483&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 Wed Jun 15 03:26:58 2016
@@ -156,11 +156,11 @@ public final class PAPFormattedDiskPage
      */
     protected byte[] getGrpprl(int index)
     {
-        int papxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * FC_SIZE) + (index * BX_SIZE)));
-        int size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + papxOffset);
+        int papxOffset = 2 * LittleEndian.getUByte(_fkp, _offset + (((_crun + 1) * FC_SIZE) + (index * BX_SIZE)));
+        int size = 2 * LittleEndian.getUByte(_fkp, _offset + papxOffset);
         if(size == 0)
         {
-            size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + ++papxOffset);
+            size = 2 * LittleEndian.getUByte(_fkp, _offset + ++papxOffset);
         }
         else
         {

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=1748483&r1=1748482&r2=1748483&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 Wed Jun 15 03:26:58 2016
@@ -130,7 +130,7 @@ public final class PAPX extends ByteProp
     }
     if (buf.length == 1)
     {
-      return (short)LittleEndian.getUnsignedByte(buf, 0);
+      return LittleEndian.getUByte(buf, 0);
     }
     return LittleEndian.getShort(buf);
   }

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=1748483&r1=1748482&r2=1748483&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 Wed Jun 15 03:26:58 2016
@@ -190,7 +190,7 @@ public class SectionTable
       // write the sepx to the document stream. starts with a 2 byte size
       // followed by the grpprl
       byte[] shortBuf = new byte[2];
-      LittleEndian.putShort(shortBuf, (short)grpprl.length);
+      LittleEndian.putShort(shortBuf, 0, (short)grpprl.length);
 
       wordDocumentStream.write(shortBuf);
       wordDocumentStream.write(grpprl);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java Wed Jun 15 03:26:58 2016
@@ -388,7 +388,7 @@ public final class ParagraphSprmCompress
         {
             // sprmPRsid
             byte[] value = new byte[4];
-            LittleEndian.putUInt( value, newPAP.getRsid() );
+            LittleEndian.putUInt( value, 0, newPAP.getRsid() );
             size += SprmUtils.addSprm( (short) 0x6467, 0, value, sprmList );
         }
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java Wed Jun 15 03:26:58 2016
@@ -188,7 +188,7 @@ public final class SectionSprmCompressor
       byte[] buf = new byte[7];
       buf[0] = (byte)(newSEP.getFPropMark() ? 1 : 0);
       int offset = LittleEndian.BYTE_SIZE;
-      LittleEndian.putShort(buf, (short)newSEP.getIbstPropRMark());
+      LittleEndian.putShort(buf, 0, (short)newSEP.getIbstPropRMark());
       offset += LittleEndian.SHORT_SIZE;
       newSEP.getDttmPropRMark().serialize(buf, offset);
       size += SprmUtils.addSprm((short)0xD227, -1, buf, sprmList);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmUtils.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmUtils.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmUtils.java Wed Jun 15 03:26:58 2016
@@ -46,7 +46,7 @@ public final class SprmUtils
   {
     byte[] sprm = new byte[varParam.length + 4];
     System.arraycopy(varParam, 0, sprm, 4, varParam.length);
-    LittleEndian.putShort(sprm, instruction);
+    LittleEndian.putShort(sprm, 0, instruction);
     LittleEndian.putShort(sprm, 2, (short)(varParam.length + 1));
     list.add(sprm);
     return sprm.length;
@@ -124,7 +124,7 @@ public final class SprmUtils
   public static int convertBrcToInt(short[] brc)
   {
     byte[] buf = new byte[4];
-    LittleEndian.putShort(buf, brc[0]);
+    LittleEndian.putShort(buf, 0, brc[0]);
     LittleEndian.putShort(buf, LittleEndian.SHORT_SIZE, brc[1]);
     return LittleEndian.getInt(buf);
   }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java Wed Jun 15 03:26:58 2016
@@ -476,7 +476,7 @@ public class Range { // TODO -instantiab
 
 		byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
 		byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
-		LittleEndian.putShort(withIndex, (short) styleIndex);
+		LittleEndian.putShort(withIndex, 0, (short) styleIndex);
 		System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
 		SprmBuffer buf = new SprmBuffer(withIndex, 2);
 
@@ -527,7 +527,7 @@ public class Range { // TODO -instantiab
 
 		byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
 		byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
-		LittleEndian.putShort(withIndex, (short) styleIndex);
+		LittleEndian.putShort(withIndex, 0, (short) styleIndex);
 		System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
 		SprmBuffer buf = new SprmBuffer(withIndex, 2);
 

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java Wed Jun 15 03:26:58 2016
@@ -36,7 +36,7 @@ public final class TestPlexOfCps
     {
       byte[] intHolder = new byte[4];
       int span = (int)(110.0f * Math.random());
-      LittleEndian.putInt(intHolder, span);
+      LittleEndian.putInt(intHolder, 0, span);
       _plexOfCps.addProperty(new GenericPropertyNode(last, last + span, intHolder));
       last += span;
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1748483&r1=1748482&r2=1748483&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Wed Jun 15 03:26:58 2016
@@ -1140,10 +1140,9 @@ public final class TestBugs extends Base
         confirmCachedValue("70164", nc2);
         confirmCachedValue("90210", nc3);
 
-        @SuppressWarnings("deprecation")
-        CellValueRecordInterface[] cvrs = ns.getSheet().getValueRecords();
-        for (int i = 0; i < cvrs.length; i++) {
-            CellValueRecordInterface cvr = cvrs[i];
+        int i = 0;
+        for (Iterator<CellValueRecordInterface> it = ns.getSheet().getCellValueIterator(); it.hasNext(); i++) {
+            CellValueRecordInterface cvr = it.next();
             if(cvr instanceof FormulaRecordAggregate) {
                 FormulaRecordAggregate fr = (FormulaRecordAggregate)cvr;
 
@@ -1161,7 +1160,7 @@ public final class TestBugs extends Base
                 }
             }
         }
-        assertEquals(3, cvrs.length);
+        assertEquals(3, i);
         wb2.close();
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org