From de1ad1c44c2f9183ad4d9ab21d3c92f2f8bd8cc5 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Tue, 29 Dec 2020 19:29:27 +0000 Subject: [PATCH] Adjust some JavaDoc git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884918 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/common/Duplicatable.java | 2 -- .../org/apache/poi/ddf/EscherProperty.java | 20 +++++++++---------- .../org/apache/poi/ddf/EscherRGBProperty.java | 2 +- .../apache/poi/ddf/EscherSimpleProperty.java | 7 +++---- .../poi/extractor/ExtractorFactory.java | 4 ++-- .../poi/hssf/usermodel/HSSFWorkbook.java | 3 +-- 6 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/java/org/apache/poi/common/Duplicatable.java b/src/java/org/apache/poi/common/Duplicatable.java index 0c2cb14860..d9a9eebca0 100644 --- a/src/java/org/apache/poi/common/Duplicatable.java +++ b/src/java/org/apache/poi/common/Duplicatable.java @@ -24,8 +24,6 @@ package org.apache.poi.common; * References to child objects are duplicated - references to parents are kept as-is and * might need to be replaced by the parent copy operation. * - * @param the implementing class itself - * * @see Copy Constructor versus Cloning */ public interface Duplicatable { diff --git a/src/java/org/apache/poi/ddf/EscherProperty.java b/src/java/org/apache/poi/ddf/EscherProperty.java index 35787e2b5c..63a738cec1 100644 --- a/src/java/org/apache/poi/ddf/EscherProperty.java +++ b/src/java/org/apache/poi/ddf/EscherProperty.java @@ -43,7 +43,7 @@ public abstract class EscherProperty implements GenericRecord { /** * The id is distinct from the actual property number. The id includes the property number the blip id * flag and an indicator whether the property is complex or not. - * + * * @param id the combined id */ protected EscherProperty(short id) { @@ -53,7 +53,7 @@ public abstract class EscherProperty implements GenericRecord { /** * Constructs a new escher property. The three parameters are combined to form a property * id. - * + * * @param propertyNumber the property number * @param isComplex true, if this is a complex property * @param isBlipId true, if this property is a blip id @@ -68,7 +68,7 @@ public abstract class EscherProperty implements GenericRecord { * Constructs a new escher property. The three parameters are combined to form a property * id. * - * @param propertyNumber the property number + * @param type one of the defined property types * @param isComplex true, if this is a complex property * @param isBlipId true, if this property is a blip id */ @@ -101,31 +101,31 @@ public abstract class EscherProperty implements GenericRecord { /** * Most properties are just 6 bytes in length. Override this if we're * dealing with complex properties. - * + * * @return size of this property (in bytes) */ public int getPropertySize() { return 6; } - + /** * Escher properties consist of a simple fixed length part and a complex variable length part. * The fixed length part is serialized first. - * + * * @param data the buffer to write to * @param pos the starting position - * + * * @return the length of the part */ abstract public int serializeSimplePart( byte[] data, int pos ); - + /** * Escher properties consist of a simple fixed length part and a complex variable length part. * The fixed length part is serialized first. - * + * * @param data the buffer to write to * @param pos the starting position - * + * * @return the length of the part */ abstract public int serializeComplexPart( byte[] data, int pos ); diff --git a/src/java/org/apache/poi/ddf/EscherRGBProperty.java b/src/java/org/apache/poi/ddf/EscherRGBProperty.java index fb43e492f0..2662fb8b6b 100644 --- a/src/java/org/apache/poi/ddf/EscherRGBProperty.java +++ b/src/java/org/apache/poi/ddf/EscherRGBProperty.java @@ -37,7 +37,7 @@ public class EscherRGBProperty /** * Create an instance of an escher boolean property. * - * @param propertyNumber The property type + * @param propertyType one of the defined property types * @param rgbColor The 24 bit value of this rgb property */ public EscherRGBProperty( EscherPropertyTypes propertyType, int rgbColor ) { diff --git a/src/java/org/apache/poi/ddf/EscherSimpleProperty.java b/src/java/org/apache/poi/ddf/EscherSimpleProperty.java index c445c0a90e..592d038fcf 100644 --- a/src/java/org/apache/poi/ddf/EscherSimpleProperty.java +++ b/src/java/org/apache/poi/ddf/EscherSimpleProperty.java @@ -29,9 +29,8 @@ import org.apache.poi.util.LittleEndian; * to a 32-bit value. Properties that can't be stored in only 32-bits are * stored as EscherComplexProperty objects. */ -public class EscherSimpleProperty extends EscherProperty -{ - private int propertyValue; +public class EscherSimpleProperty extends EscherProperty { + private final int propertyValue; /** * The id is distinct from the actual property number. The id includes the property number the blip id @@ -72,7 +71,7 @@ public class EscherSimpleProperty extends EscherProperty /** * Constructs a new escher property. The three parameters are combined to form a property id. * - * @param propertyNumber the property number + * @param type one of the defined property types * @param isComplex true, if its a complex property * @param isBlipId true, if its a blip * @param propertyValue the property value diff --git a/src/java/org/apache/poi/extractor/ExtractorFactory.java b/src/java/org/apache/poi/extractor/ExtractorFactory.java index b45b5e29e2..4348c67f60 100644 --- a/src/java/org/apache/poi/extractor/ExtractorFactory.java +++ b/src/java/org/apache/poi/extractor/ExtractorFactory.java @@ -46,7 +46,7 @@ import org.apache.poi.util.POILogger; *

Note 1 - will fail for many file formats if the POI Scratchpad jar is * not present on the runtime classpath

*

Note 2 - for text extractor creation across all formats, use - * {@link org.apache.poi.ooxml.extractor.ExtractorFactory} contained within + * {@link org.apache.poi.ooxml.extractor.POIXMLExtractorFactory} contained within * the OOXML jar.

*

Note 3 - rather than using this, for most cases you would be better * off switching to Apache Tika instead!

@@ -208,7 +208,7 @@ public final class ExtractorFactory { /** * Create the Extractor, if possible. Generally needs the Scratchpad jar. * Note that this won't check for embedded OOXML resources either, use - * {@link org.apache.poi.ooxml.extractor.ExtractorFactory} for that. + * {@link org.apache.poi.ooxml.extractor.POIXMLExtractorFactory} for that. * * @param root The {@link DirectoryNode} pointing to a document. * diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java index 0b9f60facf..2b70796017 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java @@ -1756,8 +1756,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss } /** - * As {@link #removeName(String)} is not necessarily unique - * (name + sheet index is unique), this method is more accurate. + * Remove a name. * * @param name the name to remove. */ -- 2.39.5