poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r999349 - /poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java
Date Tue, 21 Sep 2010 11:54:05 GMT
Author: nick
Date: Tue Sep 21 11:54:05 2010
New Revision: 999349

URL: http://svn.apache.org/viewvc?rev=999349&view=rev
Log:
Fix 1.6ism

Modified:
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java?rev=999349&r1=999348&r2=999349&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java Tue Sep 21 11:54:05
2010
@@ -106,7 +106,10 @@ public class Ole10Native {
       dataBuffer = new byte[totalSize-4];
       System.arraycopy(data, 4, dataBuffer, 0, dataBuffer.length);
       dataSize = totalSize - 4;
-      label = "ole-"+ HexDump.toHex(Arrays.copyOf(dataBuffer, 8));
+      
+      byte[] oleLabel = new byte[8];
+      System.arraycopy(dataBuffer, 0, oleLabel, 0, Math.min(dataBuffer.length, 8));
+      label = "ole-"+ HexDump.toHex(oleLabel);
       fileName = label;
       command = label;
     } else {



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


Mime
View raw message