From 9b3812d0271884215e6059d1bd94e77435154551 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 15 Jul 2017 22:31:09 +0000 Subject: [PATCH] some javadoc fixes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1802035 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/hssf/record/cont/ContinuableRecordInput.java | 2 +- .../org/apache/poi/hssf/usermodel/HSSFWorkbook.java | 2 +- .../org/apache/poi/poifs/crypt/CryptoFunctions.java | 4 ++-- .../poi/poifs/filesystem/POIFSDocumentPath.java | 3 +-- src/java/org/apache/poi/ss/util/CellReference.java | 8 ++++---- .../java/org/apache/poi/xssf/usermodel/XSSFSheet.java | 11 ++++------- .../org/apache/poi/ss/usermodel/BaseTestCell.java | 4 ++-- 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordInput.java b/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordInput.java index b301d54442..8479bd3d18 100644 --- a/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordInput.java +++ b/src/java/org/apache/poi/hssf/record/cont/ContinuableRecordInput.java @@ -44,7 +44,7 @@ import org.apache.poi.util.LittleEndianInput; * *

* YK: For now (March 2011) this class is only used to read - * @link org.apache.poi.hssf.record.common.UnicodeString.ExtRst} blocks of a UnicodeString. + * @see org.apache.poi.hssf.record.common.UnicodeString.ExtRst blocks of a UnicodeString. * *

*/ diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java index c5e3caf372..a24217077a 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java @@ -1025,7 +1025,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss /** * Get the HSSFSheet object at the given index. - * @param index of the sheet number (0-based physical & logical) + * @param index of the sheet number (0-based physical & logical) * @return HSSFSheet at the provided index * @throws IllegalArgumentException if the index is out of range (index * < 0 || index >= getNumberOfSheets()). diff --git a/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java b/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java index f7265d1ed3..8a14b66d16 100644 --- a/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java +++ b/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java @@ -186,7 +186,7 @@ public class CryptoFunctions { * If the given algorithm is not implemented in the JCE, it will try to load it from the bouncy castle * provider. * - * @param key the secrect key + * @param key the secret key * @param cipherAlgorithm the cipher algorithm * @param chain the chaining mode * @param vec the initialization vector (IV), can be null @@ -205,7 +205,7 @@ public class CryptoFunctions { * If the given algorithm is not implemented in the JCE, it will try to load it from the bouncy castle * provider. * - * @param key the secrect key + * @param key the secret key * @param cipherAlgorithm the cipher algorithm * @param chain the chaining mode * @param vec the initialization vector (IV), can be null diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java b/src/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java index 5b6441cdcc..916267b654 100644 --- a/src/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java +++ b/src/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java @@ -229,8 +229,7 @@ public class POIFSDocumentPath * * @return the nth component; * - * @exception ArrayIndexOutOfBoundsException if n < 0 or n >= - * length() + * @exception ArrayIndexOutOfBoundsException if n < 0 or n >= length() */ public String getComponent(int n) diff --git a/src/java/org/apache/poi/ss/util/CellReference.java b/src/java/org/apache/poi/ss/util/CellReference.java index 7078429032..4f8087456f 100644 --- a/src/java/org/apache/poi/ss/util/CellReference.java +++ b/src/java/org/apache/poi/ss/util/CellReference.java @@ -185,10 +185,10 @@ public class CellReference { /** * takes in a column reference portion of a CellRef and converts it from * ALPHA-26 number format to 0-based base 10. - * 'A' -> 0 - * 'Z' -> 25 - * 'AA' -> 26 - * 'IV' -> 255 + * 'A' -> 0 + * 'Z' -> 25 + * 'AA' -> 26 + * 'IV' -> 255 * @return zero based column index */ public static int convertColStringToIndex(String ref) { diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index b5b4e42cfd..676365e258 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -65,7 +65,6 @@ import org.apache.poi.ss.usermodel.DataValidationHelper; import org.apache.poi.ss.usermodel.Footer; import org.apache.poi.ss.usermodel.Header; import org.apache.poi.ss.usermodel.IgnoredErrorType; -import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.Name; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; @@ -1344,7 +1343,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Answer whether protection is enabled or disabled * - * @return true => protection enabled; false => protection disabled + * @return true => protection enabled; false => protection disabled */ @Override public boolean getProtect() { @@ -1548,7 +1547,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * A flag indicating whether scenarios are locked when the sheet is protected. * - * @return true => protection enabled; false => protection disabled + * @return true => protection enabled; false => protection disabled */ @Override public boolean getScenarioProtect() { @@ -2477,7 +2476,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { * * @param columnIndex - the column to set (0-based) * @param width - the width in units of 1/256th of a character width - * @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters) + * @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters) */ @Override public void setColumnWidth(int columnIndex, int width) { @@ -2768,7 +2767,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { /** * Window zoom magnification for current view representing percent values. - * Valid values range from 10 to 400. Horizontal & Vertical scale together. + * Valid values range from 10 to 400. Horizontal & Vertical scale together. * * For example: *
@@ -3899,7 +3898,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet  {
 
     }
 
-    @SuppressWarnings("resource")
     @Override
     public XSSFAutoFilter setAutoFilter(CellRangeAddress range) {
         CTAutoFilter af = worksheet.getAutoFilter();
@@ -4159,7 +4157,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet  {
      * including: pivotCacheDefinition, pivotCacheRecords
      * @return returns a pivotTable
      */
-    @SuppressWarnings("resource")
     @Beta
     private XSSFPivotTable createPivotTable() {
         XSSFWorkbook wb = getWorkbook();
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
index 0bec60deda..586acc8f56 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
@@ -515,8 +515,8 @@ public abstract class BaseTestCell {
     }
     
     /**
-     * similar to {@link #testConvertStringFormulaCell()} but  checks at a
-     * lower level that {#link {@link Cell#setCellType(int)} works properly
+     * similar to {@link #testConvertStringFormulaCell()} but checks at a
+     * lower level that {#link {@link Cell#setCellType(CellType)} works properly
      */
     @Test
     public void testSetTypeStringOnFormulaCell() throws IOException {
-- 
2.39.5