You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2021/10/21 17:34:29 UTC

svn commit: r1894453 [2/2] - in /poi/trunk: poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/ poi-ooxml/src/main/java/org/apache/poi/xssf/binary/ poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/ poi-scratchpad/src/main/java/org/apache/poi/...

Modified: poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java Thu Oct 21 17:34:29 2021
@@ -35,24 +35,6 @@ import org.apache.poi.util.StringUtil;
 
 public class DataSpaceMapUtils {
 
-    //arbitrarily selected; may need to increase
-    private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000;
-    private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH;
-
-    /**
-     * @param length the max length allowed for EscherTextboxRecord
-     */
-    public static void setMaxRecordLength(int length) {
-        MAX_RECORD_LENGTH = length;
-    }
-
-    /**
-     * @return the max length allowed for EscherTextboxRecord
-     */
-    public static int getMaxRecordLength() {
-        return MAX_RECORD_LENGTH;
-    }
-
     public static void addDefaultDataSpace(DirectoryEntry dir) throws IOException {
         DataSpaceMapEntry dsme = new DataSpaceMapEntry(
                 new int[]{ 0 }
@@ -352,7 +334,7 @@ public class DataSpaceMapUtils {
             return length == 0 ? null : "";
         }
 
-        byte[] data = IOUtils.safelyAllocate(length, MAX_RECORD_LENGTH);
+        byte[] data = IOUtils.safelyAllocate(length, CryptoFunctions.MAX_RECORD_LENGTH);
         is.readFully(data);
 
         // Padding (variable): A set of bytes that MUST be of correct size such that the size of the UTF-8-LP-P4

Modified: poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileEncryptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileEncryptor.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileEncryptor.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/agile/AgileEncryptor.java Thu Oct 21 17:34:29 2021
@@ -68,11 +68,26 @@ import org.w3c.dom.Document;
 public class AgileEncryptor extends Encryptor {
 
     //arbitrarily selected; may need to increase
-    private static final int MAX_RECORD_LENGTH = 1_000_000;
+    private static final int DEFAULT_MAX_RECORD_LENGTH = 1_000_000;
+    private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH;
 
     private byte[] integritySalt;
     private byte[] pwHash;
 
+    /**
+     * @param length the max record length allowed for AgileEncryptor
+     */
+    public static void setMaxRecordLength(int length) {
+        MAX_RECORD_LENGTH = length;
+    }
+
+    /**
+     * @return the max record length allowed for AgileEncryptor
+     */
+    public static int getMaxRecordLength() {
+        return MAX_RECORD_LENGTH;
+    }
+
     protected AgileEncryptor() {}
 
     protected AgileEncryptor(AgileEncryptor other) {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/Ole10Native.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/Ole10Native.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/Ole10Native.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/Ole10Native.java Thu Oct 21 17:34:29 2021
@@ -50,9 +50,11 @@ public class Ole10Native {
     public static final String OLE10_NATIVE = "\u0001Ole10Native";
     private static final Charset ISO1 = StandardCharsets.ISO_8859_1;
     // arbitrarily selected; may need to increase
-    private static final int MAX_RECORD_LENGTH = 100_000_000;
+    private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000_000;
+    private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH;
     // arbitrarily selected; may need to increase
-    private static final int MAX_STRING_LENGTH = 1024;
+    private static final int DEFAULT_MAX_STRING_LENGTH = 1024;
+    private static int MAX_STRING_LENGTH = DEFAULT_MAX_STRING_LENGTH;
 
     /**
      * Default content of the \u0001Ole entry
@@ -139,6 +141,34 @@ public class Ole10Native {
     }
 
     /**
+     * @param length the max record length allowed for Ole10Native
+     */
+    public static void setMaxRecordLength(int length) {
+        MAX_RECORD_LENGTH = length;
+    }
+
+    /**
+     * @return the max record length allowed for Ole10Native
+     */
+    public static int getMaxRecordLength() {
+        return MAX_RECORD_LENGTH;
+    }
+
+    /**
+     * @param length the max string length allowed for Ole10Native
+     */
+    public static void setMaxStringLength(int length) {
+        MAX_STRING_LENGTH = length;
+    }
+
+    /**
+     * @return the max string length allowed for Ole10Native
+     */
+    public static int getMaxStringLength() {
+        return MAX_STRING_LENGTH;
+    }
+
+    /**
      * Creates an instance and fills the fields based on ... the fields
      */
     public Ole10Native(String label, String filename, String command, byte[] data) {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocument.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocument.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocument.java Thu Oct 21 17:34:29 2021
@@ -40,139 +40,133 @@ import org.apache.poi.util.IOUtils;
  */
 public final class POIFSDocument implements POIFSViewable, Iterable<ByteBuffer> {
 
-    //arbitrarily selected; may need to increase
-    private static final int MAX_RECORD_LENGTH = 100_000;
-
     private DocumentProperty _property;
 
-   private POIFSFileSystem _filesystem;
-   private POIFSStream _stream;
-   private int _block_size;
-    
-   /**
-    * Constructor for an existing Document 
-    */
-   public POIFSDocument(DocumentNode document) {
-       this((DocumentProperty)document.getProperty(), 
-            ((DirectoryNode)document.getParent()).getFileSystem());
-   }
-   
-   /**
-    * Constructor for an existing Document 
-    */
-   public POIFSDocument(DocumentProperty property, POIFSFileSystem filesystem) {
-      this._property = property;
-      this._filesystem = filesystem;
-
-      if(property.getSize() < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) {
-         _stream = new POIFSStream(_filesystem.getMiniStore(), property.getStartBlock());
-         _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize();
-      } else {
-         _stream = new POIFSStream(_filesystem, property.getStartBlock());
-         _block_size = _filesystem.getBlockStoreBlockSize();
-      }
-   }
-
-   /**
-    * Constructor for a new Document
-    *
-    * @param name the name of the POIFSDocument
-    * @param stream the InputStream we read data from
-    */
-   public POIFSDocument(String name, POIFSFileSystem filesystem, InputStream stream)
-      throws IOException 
-   {
-      this._filesystem = filesystem;
-
-      // Store it
-      int length = store(stream);
-
-      // Build the property for it
-      this._property = new DocumentProperty(name, length);
-      _property.setStartBlock(_stream.getStartBlock());
-      _property.setDocument(this);
-   }
-   
-   public POIFSDocument(String name, final int size, POIFSFileSystem filesystem, POIFSWriterListener writer)
-      throws IOException 
-   {
-       this._filesystem = filesystem;
-
-       if (size < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) {
-           _stream = new POIFSStream(filesystem.getMiniStore());
-           _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize();
-       } else {
-           _stream = new POIFSStream(filesystem);
-           _block_size = _filesystem.getBlockStoreBlockSize();
-       }
-       
-       this._property = new DocumentProperty(name, size);
-       _property.setStartBlock(_stream.getStartBlock());
-       _property.setDocument(this);
-
-       try (DocumentOutputStream os = new DocumentOutputStream(this, size)) {
-           POIFSDocumentPath path = new POIFSDocumentPath(name.split("\\\\"));
-           String docName = path.getComponent(path.length() - 1);
-           POIFSWriterEvent event = new POIFSWriterEvent(os, path, docName, size);
-           writer.processPOIFSWriterEvent(event);
-       }
-   }
-   
-   /**
-    * Stores the given data for this Document
-    */
-   private int store(InputStream stream) throws IOException {
-       final int bigBlockSize = POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE;
-       BufferedInputStream bis = new BufferedInputStream(stream, bigBlockSize+1);
-       bis.mark(bigBlockSize);
-
-       // Do we need to store as a mini stream or a full one?
-       long streamBlockSize = IOUtils.skipFully(bis, bigBlockSize);
-       if (streamBlockSize < bigBlockSize) {
-          _stream = new POIFSStream(_filesystem.getMiniStore());
-          _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize();
-       } else {
-          _stream = new POIFSStream(_filesystem);
-          _block_size = _filesystem.getBlockStoreBlockSize();
-       }
-
-       // start from the beginning 
-       bis.reset();
-       
-       // Store it
-       final long length;
-       try (OutputStream os = _stream.getOutputStream()) {
-           length = IOUtils.copy(bis, os);
-
-           // Pad to the end of the block with -1s
-           int usedInBlock = (int) (length % _block_size);
-           if (usedInBlock != 0 && usedInBlock != _block_size) {
-               int toBlockEnd = _block_size - usedInBlock;
-               byte[] padding = IOUtils.safelyAllocate(toBlockEnd, MAX_RECORD_LENGTH);
-               Arrays.fill(padding, (byte) 0xFF);
-               os.write(padding);
-           }
-       }
-
-       return Math.toIntExact(length);
-   }
-   
-   /**
-    * Frees the underlying stream and property
-    */
-   void free() throws IOException {
-       _stream.free();
-       _property.setStartBlock(POIFSConstants.END_OF_CHAIN);
-   }
-   
-   POIFSFileSystem getFileSystem()
-   {
-       return _filesystem;
-   }
-   
-   int getDocumentBlockSize() {
-      return _block_size;
-   }
+    private POIFSFileSystem _filesystem;
+    private POIFSStream _stream;
+    private int _block_size;
+
+    /**
+     * Constructor for an existing Document
+     */
+    public POIFSDocument(DocumentNode document) {
+        this((DocumentProperty) document.getProperty(),
+                ((DirectoryNode) document.getParent()).getFileSystem());
+    }
+
+    /**
+     * Constructor for an existing Document
+     */
+    public POIFSDocument(DocumentProperty property, POIFSFileSystem filesystem) {
+        this._property = property;
+        this._filesystem = filesystem;
+
+        if (property.getSize() < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) {
+            _stream = new POIFSStream(_filesystem.getMiniStore(), property.getStartBlock());
+            _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize();
+        } else {
+            _stream = new POIFSStream(_filesystem, property.getStartBlock());
+            _block_size = _filesystem.getBlockStoreBlockSize();
+        }
+    }
+
+    /**
+     * Constructor for a new Document
+     *
+     * @param name   the name of the POIFSDocument
+     * @param stream the InputStream we read data from
+     */
+    public POIFSDocument(String name, POIFSFileSystem filesystem, InputStream stream)
+            throws IOException {
+        this._filesystem = filesystem;
+
+        // Store it
+        int length = store(stream);
+
+        // Build the property for it
+        this._property = new DocumentProperty(name, length);
+        _property.setStartBlock(_stream.getStartBlock());
+        _property.setDocument(this);
+    }
+
+    public POIFSDocument(String name, final int size, POIFSFileSystem filesystem, POIFSWriterListener writer)
+            throws IOException {
+        this._filesystem = filesystem;
+
+        if (size < POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE) {
+            _stream = new POIFSStream(filesystem.getMiniStore());
+            _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize();
+        } else {
+            _stream = new POIFSStream(filesystem);
+            _block_size = _filesystem.getBlockStoreBlockSize();
+        }
+
+        this._property = new DocumentProperty(name, size);
+        _property.setStartBlock(_stream.getStartBlock());
+        _property.setDocument(this);
+
+        try (DocumentOutputStream os = new DocumentOutputStream(this, size)) {
+            POIFSDocumentPath path = new POIFSDocumentPath(name.split("\\\\"));
+            String docName = path.getComponent(path.length() - 1);
+            POIFSWriterEvent event = new POIFSWriterEvent(os, path, docName, size);
+            writer.processPOIFSWriterEvent(event);
+        }
+    }
+
+    /**
+     * Stores the given data for this Document
+     */
+    private int store(InputStream stream) throws IOException {
+        final int bigBlockSize = POIFSConstants.BIG_BLOCK_MINIMUM_DOCUMENT_SIZE;
+        BufferedInputStream bis = new BufferedInputStream(stream, bigBlockSize + 1);
+        bis.mark(bigBlockSize);
+
+        // Do we need to store as a mini stream or a full one?
+        long streamBlockSize = IOUtils.skipFully(bis, bigBlockSize);
+        if (streamBlockSize < bigBlockSize) {
+            _stream = new POIFSStream(_filesystem.getMiniStore());
+            _block_size = _filesystem.getMiniStore().getBlockStoreBlockSize();
+        } else {
+            _stream = new POIFSStream(_filesystem);
+            _block_size = _filesystem.getBlockStoreBlockSize();
+        }
+
+        // start from the beginning
+        bis.reset();
+
+        // Store it
+        final long length;
+        try (OutputStream os = _stream.getOutputStream()) {
+            length = IOUtils.copy(bis, os);
+
+            // Pad to the end of the block with -1s
+            int usedInBlock = (int) (length % _block_size);
+            if (usedInBlock != 0 && usedInBlock != _block_size) {
+                int toBlockEnd = _block_size - usedInBlock;
+                byte[] padding = IOUtils.safelyAllocate(toBlockEnd, POIFSFileSystem.MAX_RECORD_LENGTH);
+                Arrays.fill(padding, (byte) 0xFF);
+                os.write(padding);
+            }
+        }
+
+        return Math.toIntExact(length);
+    }
+
+    /**
+     * Frees the underlying stream and property
+     */
+    void free() throws IOException {
+        _stream.free();
+        _property.setStartBlock(POIFSConstants.END_OF_CHAIN);
+    }
+
+    POIFSFileSystem getFileSystem() {
+        return _filesystem;
+    }
+
+    int getDocumentBlockSize() {
+        return _block_size;
+    }
 
     @Override
     public Iterator<ByteBuffer> iterator() {
@@ -180,83 +174,83 @@ public final class POIFSDocument impleme
     }
 
     Iterator<ByteBuffer> getBlockIterator() {
-       return (getSize() > 0 ? _stream : Collections.<ByteBuffer>emptyList()).iterator();
+        return (getSize() > 0 ? _stream : Collections.<ByteBuffer>emptyList()).iterator();
+    }
+
+    /**
+     * @return size of the document
+     */
+    public int getSize() {
+        return _property.getSize();
+    }
+
+    public void replaceContents(InputStream stream) throws IOException {
+        free();
+        int size = store(stream);
+        _property.setStartBlock(_stream.getStartBlock());
+        _property.updateSize(size);
+    }
+
+    /**
+     * @return the instance's DocumentProperty
+     */
+    DocumentProperty getDocumentProperty() {
+        return _property;
+    }
+
+    /**
+     * Get an array of objects, some of which may implement POIFSViewable
+     *
+     * @return an array of Object; may not be null, but may be empty
+     */
+    public Object[] getViewableArray() {
+        String result = "<NO DATA>";
+
+        if (getSize() > 0) {
+            // Get all the data into a single array
+            byte[] data = IOUtils.safelyAllocate(getSize(), POIFSFileSystem.MAX_RECORD_LENGTH);
+            int offset = 0;
+            for (ByteBuffer buffer : _stream) {
+                int length = Math.min(_block_size, data.length - offset);
+                buffer.get(data, offset, length);
+                offset += length;
+            }
+
+            result = HexDump.dump(data, 0, 0);
+        }
+
+        return new String[]{result};
+    }
+
+    /**
+     * Get an Iterator of objects, some of which may implement POIFSViewable
+     *
+     * @return an Iterator; may not be null, but may have an empty back end
+     * store
+     */
+    public Iterator<Object> getViewableIterator() {
+        return emptyIterator();
+    }
+
+    /**
+     * Give viewers a hint as to whether to call getViewableArray or
+     * getViewableIterator
+     *
+     * @return <code>true</code> if a viewer should call getViewableArray,
+     * <code>false</code> if a viewer should call getViewableIterator
+     */
+    public boolean preferArray() {
+        return true;
     }
 
-   /**
-    * @return size of the document
-    */
-   public int getSize() {
-      return _property.getSize();
-   }
-   
-   public void replaceContents(InputStream stream) throws IOException {
-       free();
-       int size = store(stream);
-       _property.setStartBlock(_stream.getStartBlock()); 
-       _property.updateSize(size);
-   }
-
-   /**
-    * @return the instance's DocumentProperty
-    */
-   DocumentProperty getDocumentProperty() {
-      return _property;
-   }
-
-   /**
-    * Get an array of objects, some of which may implement POIFSViewable
-    *
-    * @return an array of Object; may not be null, but may be empty
-    */
-   public Object[] getViewableArray() {
-      String result = "<NO DATA>";
-
-      if(getSize() > 0) {
-         // Get all the data into a single array
-         byte[] data = IOUtils.safelyAllocate(getSize(), MAX_RECORD_LENGTH);
-         int offset = 0;
-         for(ByteBuffer buffer : _stream) {
-            int length = Math.min(_block_size, data.length-offset); 
-            buffer.get(data, offset, length);
-            offset += length;
-         }
- 
-         result = HexDump.dump(data, 0, 0);
-      }
-      
-      return new String[]{ result };
-   }
-
-   /**
-    * Get an Iterator of objects, some of which may implement POIFSViewable
-    *
-    * @return an Iterator; may not be null, but may have an empty back end
-    *        store
-    */
-   public Iterator<Object> getViewableIterator() {
-      return emptyIterator();
-   }
-
-   /**
-    * Give viewers a hint as to whether to call getViewableArray or
-    * getViewableIterator
-    *
-    * @return <code>true</code> if a viewer should call getViewableArray,
-    *        <code>false</code> if a viewer should call getViewableIterator
-    */
-   public boolean preferArray() {
-      return true;
-   }
-
-   /**
-    * Provides a short description of the object, to be used when a
-    * POIFSViewable object has not provided its contents.
-    *
-    * @return short description
-    */
-   public String getShortDescription() {
+    /**
+     * Provides a short description of the object, to be used when a
+     * POIFSViewable object has not provided its contents.
+     *
+     * @return short description
+     */
+    public String getShortDescription() {
 
-       return "Document: \"" + _property.getName() + "\" size = " + getSize();
-   }
+        return "Document: \"" + _property.getName() + "\" size = " + getSize();
+    }
 }

Modified: poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java Thu Oct 21 17:34:29 2021
@@ -61,7 +61,8 @@ import org.apache.poi.util.Internal;
 public class POIFSFileSystem extends BlockStore
         implements POIFSViewable, Closeable {
     //arbitrarily selected; may need to increase
-    private static final int MAX_RECORD_LENGTH = 100_000;
+    private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000;
+    static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH;
 
     private static final Logger LOG = LogManager.getLogger(POIFSFileSystem.class);
 
@@ -94,6 +95,20 @@ public class POIFSFileSystem extends Blo
     private POIFSBigBlockSize bigBlockSize =
             POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS;
 
+    /**
+     * @param length the max record length allowed for POIFSFileSystem
+     */
+    public static void setMaxRecordLength(int length) {
+        MAX_RECORD_LENGTH = length;
+    }
+
+    /**
+     * @return the max record length allowed for POIFSFileSystem
+     */
+    public static int getMaxRecordLength() {
+        return MAX_RECORD_LENGTH;
+    }
+
     private POIFSFileSystem(boolean newFS) {
         _header = new HeaderBlock(bigBlockSize);
         _property_table = new PropertyTable(_header);

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java Thu Oct 21 17:34:29 2021
@@ -68,14 +68,14 @@ public class EmbeddedExtractor implement
     private static final String CONTENT_TYPE_XLS = "application/vnd.ms-excel";
 
     /**
-     * @param length the max length allowed for EmbeddedExtractor
+     * @param length the max record length allowed for EmbeddedExtractor
      */
     public static void setMaxRecordLength(int length) {
         MAX_RECORD_LENGTH = length;
     }
 
     /**
-     * @return the max length allowed for EmbeddedExtractor
+     * @return the max record length allowed for EmbeddedExtractor
      */
     public static int getMaxRecordLength() {
         return MAX_RECORD_LENGTH;

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java Thu Oct 21 17:34:29 2021
@@ -57,14 +57,14 @@ final class FunctionMetadataReader {
     private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
 
     /**
-     * @param length the max length allowed for FunctionMetadataReader
+     * @param length the max record length allowed for FunctionMetadataReader
      */
     public static void setMaxRecordLength(int length) {
         MAX_RECORD_LENGTH = length;
     }
 
     /**
-     * @return the max length allowed for FunctionMetadataReader
+     * @return the max record length allowed for FunctionMetadataReader
      */
     public static int getMaxRecordLength() {
         return MAX_RECORD_LENGTH;

Modified: poi/trunk/poi/src/main/java/org/apache/poi/util/LZWDecompresser.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/util/LZWDecompresser.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/util/LZWDecompresser.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/util/LZWDecompresser.java Thu Oct 21 17:34:29 2021
@@ -61,14 +61,14 @@ public abstract class LZWDecompresser {
     private final boolean positionIsBigEndian;
 
     /**
-     * @param length the max length allowed for LZWDecompresser
+     * @param length the max record length allowed for LZWDecompresser
      */
     public static void setMaxRecordLength(int length) {
         MAX_RECORD_LENGTH = length;
     }
 
     /**
-     * @return the max length allowed for LZWDecompresser
+     * @return the max record length allowed for LZWDecompresser
      */
     public static int getMaxRecordLength() {
         return MAX_RECORD_LENGTH;

Modified: poi/trunk/poi/src/main/java/org/apache/poi/util/StringUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/util/StringUtil.java?rev=1894453&r1=1894452&r2=1894453&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/util/StringUtil.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/util/StringUtil.java Thu Oct 21 17:34:29 2021
@@ -37,14 +37,14 @@ public final class StringUtil {
     public static final Charset WIN_1252 = Charset.forName("cp1252");
 
     /**
-     * @param length the max length allowed for StringUtil
+     * @param length the max record length allowed for StringUtil
      */
     public static void setMaxRecordLength(int length) {
         MAX_RECORD_LENGTH = length;
     }
 
     /**
-     * @return the max length allowed for StringUtil
+     * @return the max record length allowed for StringUtil
      */
     public static int getMaxRecordLength() {
         return MAX_RECORD_LENGTH;



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