Skip to content

Commit

Permalink
fix javadoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hansva committed Oct 1, 2024
1 parent 5039d06 commit 0965196
Show file tree
Hide file tree
Showing 118 changed files with 267 additions and 388 deletions.
18 changes: 9 additions & 9 deletions core/src/main/java/org/apache/hop/core/Const.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public String getMessage() {
public static final int LENGTH = 350;

/**
* @deprecated The margin between the different dialog components & widgets. This method is
* @deprecated The margin between the different dialog components & widgets. This method is
* deprecated. Please use PropsUi.getMargin() instead.
*/
@Deprecated(since = "2.10")
Expand Down Expand Up @@ -810,7 +810,7 @@ public static boolean toBoolean(String string) {
* A variable to configure the minimum allowed ratio between de- and inflated bytes to detect a
* zipbomb.
*
* <p>If not set or if the configured value is invalid, it defaults to {@value
* <p>If not set or if the configured value is invalid, it defaults to {@link
* #HOP_ZIP_MIN_INFLATE_RATIO_DEFAULT}
*
* @see #HOP_ZIP_MIN_INFLATE_RATIO_DEFAULT
Expand Down Expand Up @@ -842,7 +842,7 @@ public static boolean toBoolean(String string) {
/**
* A variable to configure the maximum file size of a single zip entry.
*
* <p>If not set or if the configured value is invalid, it defaults to {@value
* <p>If not set or if the configured value is invalid, it defaults to {@link
* #HOP_ZIP_MAX_ENTRY_SIZE_DEFAULT}
*
* @see #HOP_ZIP_MAX_ENTRY_SIZE_DEFAULT
Expand Down Expand Up @@ -873,7 +873,7 @@ public static boolean toBoolean(String string) {
* A variable to configure the maximum number of characters of text that are extracted before an
* exception is thrown during extracting text from documents.
*
* <p>If not set or if the configured value is invalid, it defaults to {@value
* <p>If not set or if the configured value is invalid, it defaults to {@link
* #HOP_ZIP_MAX_TEXT_SIZE_DEFAULT}
*
* @see #HOP_ZIP_MAX_TEXT_SIZE_DEFAULT
Expand Down Expand Up @@ -2628,7 +2628,7 @@ public static Date removeTimeFromDate(Date input) {
}

/**
* Escape HTML content. i.e. replace characters with &values;
* Escape HTML content. i.e. replace characters with &amp;values;
*
* @param content content
* @return escaped content
Expand All @@ -2641,7 +2641,7 @@ public static String escapeHtml(String content) {
}

/**
* UnEscape HTML content. i.e. replace characters with &values;
* UnEscape HTML content. i.e. replace characters with &amp;values;
*
* @param content content
* @return unescaped content
Expand All @@ -2654,7 +2654,7 @@ public static String unEscapeHtml(String content) {
}

/**
* UnEscape XML content. i.e. replace characters with &values;
* UnEscape XML content. i.e. replace characters with &amp;values;
*
* @param content content
* @return unescaped content
Expand All @@ -2667,7 +2667,7 @@ public static String unEscapeXml(String content) {
}

/**
* Escape SQL content. i.e. replace characters with &values;
* Escape SQL content. i.e. replace characters with &amp;values;
*
* @param content content
* @return escaped content
Expand Down Expand Up @@ -2864,7 +2864,7 @@ public static int getOcuranceString(String string, String searchFor) {
}

/**
* Mask XML content. i.e. replace characters with &values;
* Mask XML content. i.e. replace characters with &amp;values;
*
* @param content content
* @return masked content
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/org/apache/hop/core/DbCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ public void saveCache() throws HopFileException {
* Create the database cache instance by loading it from disk
*
* @return the database cache instance.
* @throws HopFileException
*/
public static final DbCache getInstance() {
if (dbCache != null) {
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/java/org/apache/hop/core/IRowSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ public interface IRowSet {
*/
Object[] getRowWait(long timeout, TimeUnit tu);

/**
* @return Set indication that there is no more input
*/
void setDone();

/**
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/org/apache/hop/core/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
* <li>Whether the pipeline was stopped
* <li>Logging information (channel ID and text)
* <p>After execution of a workflow or pipeline, the Result can be evaluated.
* </ul>
*/
public class Result implements Cloneable {

Expand Down Expand Up @@ -808,7 +809,7 @@ public void setLogText(String logText) {
/**
* Returns the elapsed time of the ETL execution in milliseconds
*
* @returns elapsed time of the ETL execution in milliseconds
* @return elapsed time of the ETL execution in milliseconds
*/
public long getElapsedTimeMillis() {
return elapsedTimeMillis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ public String getSqlListOfSchemas() {
}

/**
* @return The maximum number of columns in a database, <=0 means: no known limit
* @return The maximum number of columns in a database, {@literal <=}0 means: no known limit
*/
@Override
public int getMaxColumnsInIndex() {
Expand Down
23 changes: 12 additions & 11 deletions core/src/main/java/org/apache/hop/core/database/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ public void rollback(boolean force) throws HopDatabaseException {
}

/**
* Prepare inserting values into a table, using the fields & values in a Row
* Prepare inserting values into a table, using the fields &amp; values in a Row
*
* @param rowMeta The row metadata to determine which values need to be inserted
* @param tableName The name of the table in which we want to insert rows
Expand All @@ -764,7 +764,7 @@ public void prepareInsert(IRowMeta rowMeta, String tableName) throws HopDatabase
}

/**
* Prepare inserting values into a table, using the fields & values in a Row
* Prepare inserting values into a table, using the fields &amp; values in a Row
*
* @param rowMeta The metadata row to determine which values need to be inserted
* @param schemaName The name of the schema in which we want to insert rows
Expand Down Expand Up @@ -1514,7 +1514,6 @@ public ResultSet openQuery(String sql) throws HopDatabaseException {
* @param params The parameters or null if no parameters are used.
* @return A JDBC ResultSet
* @throws HopDatabaseException when something goes wrong with the query.
* @data the parameter data to open the query with
*/
public ResultSet openQuery(String sql, IRowMeta params, Object[] data)
throws HopDatabaseException {
Expand Down Expand Up @@ -3360,7 +3359,8 @@ public boolean isSystemTable(String tableName) {
* Reads the result of an SQL query into an ArrayList
*
* @param sql The SQL to launch
* @param limit <=0 means unlimited, otherwise this specifies the maximum number of rows read.
* @param limit {@literal <=0} means unlimited, otherwise this specifies the maximum number of
* rows read.
* @return An ArrayList of rows.
* @throws HopDatabaseException if something goes wrong.
*/
Expand All @@ -3372,7 +3372,8 @@ public List<Object[]> getRows(String sql, int limit) throws HopDatabaseException
* Reads the result of an SQL query into an ArrayList
*
* @param sql The SQL to launch
* @param limit <=0 means unlimited, otherwise this specifies the maximum number of rows read.
* @param limit {@literal <=0} means unlimited, otherwise this specifies the maximum number of
* rows read.
* @param monitor The progress monitor to update while getting the rows.
* @return An ArrayList of rows.
* @throws HopDatabaseException if something goes wrong.
Expand All @@ -3391,7 +3392,8 @@ public List<Object[]> getRows(String sql, int limit, IProgressMonitor monitor)
* @param data The values of any parameters to be passed to the query
* @param fetchMode The fetch mode for the query (ResultSet.FETCH_FORWARD, e.g.)
* @param lazyConversion Whether to perform lazy conversion of the values
* @param limit <=0 means unlimited, otherwise this specifies the maximum number of rows read.
* @param limit {@literal <=0} means unlimited, otherwise this specifies the maximum number of
* rows read.
* @param monitor The progress monitor to update while getting the rows.
* @return An ArrayList of rows.
* @throws HopDatabaseException if something goes wrong.
Expand All @@ -3417,7 +3419,8 @@ public List<Object[]> getRows(
* Reads the result of a ResultSet into an ArrayList
*
* @param rset the ResultSet to read out
* @param limit <=0 means unlimited, otherwise this specifies the maximum number of rows read.
* @param limit {@literal <=0} means unlimited, otherwise this specifies the maximum number of
* rows read.
* @param monitor The progress monitor to update while getting the rows.
* @return An ArrayList of rows.
* @throws HopDatabaseException if something goes wrong.
Expand Down Expand Up @@ -3468,8 +3471,8 @@ public List<Object[]> getFirstRows(String tableName, int limit) throws HopDataba
* Get the first rows from a table (for preview)
*
* @param tableName The table name (or schema/table combination): this needs to be quoted properly
* @param limit limit <=0 means unlimited, otherwise this specifies the maximum number of rows
* read.
* @param limit limit {@literal <=0} means unlimited, otherwise this specifies the maximum number
* of rows read.
* @param monitor The progress monitor to update while getting the rows.
* @return An ArrayList of rows.
* @throws HopDatabaseException in case something goes wrong
Expand Down Expand Up @@ -4303,7 +4306,6 @@ public void closeProcedureStatement() throws HopDatabaseException {
* Return SQL CREATION statement for a Table
*
* @param tableName The table to create
* @throws HopDatabaseException
*/
public String getDDLCreationTable(String tableName, IRowMeta fields) {
String retval;
Expand Down Expand Up @@ -4615,7 +4617,6 @@ public void setNrExecutedCommits(int nrExecutedCommits) {
* statement. If false separate statements will be isolated and executed.
* @return a Result object indicating the number of lines read, deleted, inserted, updated, ...
* @throws HopDatabaseException in case anything goes wrong.
* @sendSinglestatement send one statement
*/
public Result execStatementsFromFile(String filename, boolean sendSinglestatement)
throws HopException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ public boolean preserveReservedCase() {
}

/**
* @return true if reserved words' case should be preserved
* @param b set to true if reserved words' case should be preserved
*/
public void setPreserveReservedCase(boolean b) {
iDatabase.setPreserveReservedCase(b);
Expand Down Expand Up @@ -2250,8 +2250,6 @@ public boolean isReadOnly() {
/**
* Sets the marker used to determine if the DatabaseMeta should be allowed to be modified/saved.
* Setting to true does NOT prevent object modification.
*
* @return
*/
public void setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ boolean hasIndex(Database database, String schemaName, String tableName, String[
String getSqlListOfSchemas();

/**
* @return The maximum number of columns in a database, <=0 means: no known limit
* @return The maximum number of columns in a database, {@literal <=}0 means: no known limit
*/
int getMaxColumnsInIndex();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ private DatabaseConnectionMap() {
}

/**
* Tries to obtain an existing <tt>Database</tt> instance for specified parameters. If none is
* found, then maps the key's value to <tt>database</tt>. Similarly to {@linkplain
* ConcurrentHashMap#putIfAbsent(Object, Object)} returns <tt>null</tt> if there was no value for
* Tries to obtain an existing <i>Database</i> instance for specified parameters. If none is
* found, then maps the key's value to <i>database</i>. Similarly to {@linkplain
* ConcurrentHashMap#putIfAbsent(Object, Object)} returns <i>null</i> if there was no value for
* the specified key and they mapped value otherwise.
*
* @param connectionGroup connection group
* @param partitionID partition's id
* @param database database
* @return <tt>null</tt> or previous value
* @return <i>null</i> or previous value
*/
public Database getOrStoreIfAbsent(
String connectionGroup, String partitionID, Database database) {
Expand Down Expand Up @@ -88,7 +88,6 @@ public Map<String, Database> getMap() {
* Get all the databases in the map which belong to a certain group...
*
* @param group The group to search for
* @return
*/
public List<Database> getDatabases(String group) {
List<Database> databases = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,27 @@
import org.apache.commons.vfs2.FileObject;

/**
* <p>
* Utility class to guess the encoding of a given byte array. The guess is unfortunately not 100% sure. Especially for
* 8-bit charsets. It's not possible to know which 8-bit charset is used. Except through statistical analysis. We will
* then infer that the charset encountered is the same as the default standard charset.
* </p>
* Utility class to guess the encoding of a given byte array. The guess is unfortunately not 100%
* sure. Especially for 8-bit charsets. It's not possible to know which 8-bit charset is used.
* Except through statistical analysis. We will then infer that the charset encountered is the same
* as the default standard charset.
*
* <p>
* On the other hand, unicode files encoded in UTF-16 (low or big endian) or UTF-8 files with a Byte Order Marker are
* easy to find. For UTF-8 files with no BOM, if the buffer is wide enough, it's easy to guess.
* </p>
* <p>On the other hand, unicode files encoded in UTF-16 (low or big endian) or UTF-8 files with a
* Byte Order Marker are easy to find. For UTF-8 files with no BOM, if the buffer is wide enough,
* it's easy to guess.
*
* <p>
* Tested against a complicated UTF-8 file, Sun's implementation does not render bad UTF-8 constructs as expected by the
* specification. But with a buffer wide enough, the method guessEncoding() did behave correctly and recognized the
* UTF-8 charset.
* </p>
* <p>Tested against a complicated UTF-8 file, Sun's implementation does not render bad UTF-8
* constructs as expected by the specification. But with a buffer wide enough, the method
* guessEncoding() did behave correctly and recognized the UTF-8 charset.
*
* <p>
* A byte buffer of 4KB or 8KB is sufficient to be able to guess the encoding.
* </p>
* <p>A byte buffer of 4KB or 8KB is sufficient to be able to guess the encoding.
*
* <p>
* Usage:
* </p>
* <p>Usage: // guess the encoding Charset guessedCharset =
* com.glaforge.i18n.io.CharsetToolkit.guessEncoding(file, 4096);
*
* <pre>
* // guess the encoding
* Charset guessedCharset = com.glaforge.i18n.io.CharsetToolkit.guessEncoding(file, 4096);
*
* // create a reader with the charset we've just discovered
* FileInputStream fis = new FileInputStream(file);
* InputStreamReader isr = new InputStreamReader(fis, guessedCharset);
* <p>// create a reader with the charset we've just discovered FileInputStream fis = new
* FileInputStream(file); InputStreamReader isr = new InputStreamReader(fis, guessedCharset);
* BufferedReader br = new BufferedReader(isr);
*
*/
public class CharsetToolkit {
private byte[] buffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ByteArrayHashIndex {
/**
* Create a Byte array hash index to store row
*
* @param rowMeta
* @param keyRowMeta
*/
public ByteArrayHashIndex(IRowMeta keyRowMeta, int size) {
this.keyRowMeta = keyRowMeta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ByteArrayHashMap extends AbstractHashedMap {
private IRowMeta keyMeta;

/**
* Constructs an empty <tt>ByteArrayHashMap</tt> with the specified initial capacity and load
* Constructs an empty <i>ByteArrayHashMap</i> with the specified initial capacity and load
* factor.
*
* @param initialCapacity the initial capacity
Expand Down Expand Up @@ -66,8 +66,8 @@ public final boolean equalsByteArray(byte[] value, byte[] cmpValue) {
}

/**
* Constructs an empty <tt>ByteArrayHashMap</tt> with the specified initial capacity and the
* default load factor (0.75).
* Constructs an empty <i>ByteArrayHashMap</i> with the specified initial capacity and the default
* load factor (0.75).
*
* @param initialCapacity the initial capacity.
* @throws IllegalArgumentException if the initial capacity is negative.
Expand All @@ -77,8 +77,8 @@ public ByteArrayHashMap(int initialCapacity, IRowMeta keyMeta) {
}

/**
* Constructs an empty <tt>HashMap</tt> with the default initial capacity (16) and the default
* load factor (0.75).
* Constructs an empty <i>HashMap</i> with the default initial capacity (16) and the default load
* factor (0.75).
*/
public ByteArrayHashMap(IRowMeta keyMeta) {
this(DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, keyMeta);
Expand All @@ -94,9 +94,6 @@ public ByteArrayHashMap(IRowMeta keyMeta) {
* one such entry.)
*
* @param key The key to look up.
* @throws HopValueException in case of a value conversion error
* @see #put(Object)
* @see #insert(Object)
*/
public byte[] get(byte[] key) {
return (byte[]) super.get(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ public LogTableField(
/**
* Create a new enabled log table field with the specified field name for the specified subject.
*
* @param fieldname
* @param id
* @param fieldName
* @param subject
*/
public LogTableField(String id, String fieldName, Object subject) {
Expand Down
Loading

0 comments on commit 0965196

Please sign in to comment.