This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c14effe8a413 CAMEL-21356: Javadoc compliance with doclint for Java 17
in camel-util (#29579)
c14effe8a413 is described below
commit c14effe8a413f3c0116d53aaf7552d341e135ab2
Author: Loris Boiteux <[email protected]>
AuthorDate: Wed Nov 11 07:50:17 2026 +0100
CAMEL-21356: Javadoc compliance with doclint for Java 17 in camel-util
(#29579)
* CAMEL-21356 - Javadoc compliance with doclint for Java 17 in camel-util
* CAMEL-21356 - Fix wrong Javadoc in FileUtil, IOHelper and ObjectHelper
* CAMEL-21356 - Fix wrong Javadoc of isEmpty/isNotEmpty in ObjectHelper
* CAMEL-21356 - Align the Javadoc of isNotEmpty(String) in ObjectHelper
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../java/org/apache/camel/util/ArtifactUtils.java | 2 +-
.../camel/util/CamelCaseOrderedProperties.java | 8 +--
.../java/org/apache/camel/util/CamelURIParser.java | 8 +--
.../org/apache/camel/util/CaseInsensitiveMap.java | 6 +-
.../org/apache/camel/util/CollectionHelper.java | 2 +-
.../java/org/apache/camel/util/EscapeHelper.java | 6 +-
.../org/apache/camel/util/FilePathResolver.java | 8 +--
.../main/java/org/apache/camel/util/FileUtil.java | 38 +++++-----
.../main/java/org/apache/camel/util/IOHelper.java | 24 +++----
.../org/apache/camel/util/InetAddressUtil.java | 18 ++---
.../java/org/apache/camel/util/MimeTypeHelper.java | 2 +-
.../java/org/apache/camel/util/ObjectHelper.java | 82 +++++++++++-----------
.../java/org/apache/camel/util/OgnlHelper.java | 8 +--
.../camel/util/OrderedLocationProperties.java | 4 +-
.../org/apache/camel/util/OrderedProperties.java | 2 +-
.../org/apache/camel/util/ReflectionHelper.java | 4 +-
.../main/java/org/apache/camel/util/StopWatch.java | 6 +-
.../java/org/apache/camel/util/StringHelper.java | 34 ++++-----
.../org/apache/camel/util/StringQuoteHelper.java | 27 +++----
.../java/org/apache/camel/util/URISupport.java | 72 +++++++++----------
.../camel/util/UnsafeUriCharactersEncoder.java | 2 +-
.../RejectableScheduledThreadPoolExecutor.java | 12 ++--
.../concurrent/RejectableThreadPoolExecutor.java | 12 ++--
.../concurrent/SizedScheduledExecutorService.java | 6 +-
.../concurrent/SynchronousExecutorService.java | 4 +-
.../apache/camel/util/concurrent/ThreadHelper.java | 4 +-
.../util/concurrent/ThreadPoolRejectedPolicy.java | 6 +-
.../apache/camel/util/function/ThrowingHelper.java | 8 +--
.../camel/util/function/ThrowingTriConsumer.java | 1 -
29 files changed, 212 insertions(+), 204 deletions(-)
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
b/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
index 9c9f40dfd936..1a40f60a7320 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
@@ -23,7 +23,7 @@ import java.util.Set;
/**
* Which Camel artifact (Maven artifactId) ships a component, data format,
language or built-in bean.
- * <p/>
+ * <p>
* The runtime cannot tell this on its own: the metadata that knows is in the
jar that is missing. So the tables are
* generated from the catalog at build time (like {@link SensitiveUtils}) and
used by the error messages that say what
* to add to the classpath when a name cannot be resolved, or which known name
was likely meant.
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/CamelCaseOrderedProperties.java
b/core/camel-util/src/main/java/org/apache/camel/util/CamelCaseOrderedProperties.java
index 6b3602b249eb..60ca4ce0d545 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/CamelCaseOrderedProperties.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/CamelCaseOrderedProperties.java
@@ -22,12 +22,12 @@ import java.util.Properties;
/**
* This class is a camelCase ordered {@link Properties} where the key/values
are stored in the order they are added or
* loaded.
- * <p/>
+ * <p>
* The keys are stored in the original case, for example a key of
<code>camel.main.stream-caching-enabled</code> is
* stored as <code>camel.main.stream-caching-enabled</code>.
- * <p/>
- * However the lookup of a value by key with the <tt>get</tt> methods, will
support camelCase or dash style.
- * <p/>
+ * <p>
+ * However the lookup of a value by key with the <code>get</code> methods,
will support camelCase or dash style.
+ * <p>
* Note: This implementation is only intended as implementation detail for
Camel tooling such as camel-jbang, and has
* only been designed to provide the needed functionality. The complex logic
for loading properties has been kept from
* the JDK {@link Properties} class.
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/CamelURIParser.java
b/core/camel-util/src/main/java/org/apache/camel/util/CamelURIParser.java
index 8c6530c5db27..3865fb9a331b 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/CamelURIParser.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/CamelURIParser.java
@@ -32,7 +32,7 @@ public final class CamelURIParser {
/**
* Parses the URI (in fast mode).
*
- * If this parser cannot parse the uri then <tt>null</tt> is returned. And
instead the follow code can be used:
+ * If this parser cannot parse the uri then <code>null</code> is returned.
And instead the follow code can be used:
*
* <pre>
* URI u = new URI(UnsafeUriCharactersEncoder.encode(uri, true));
@@ -40,7 +40,7 @@ public final class CamelURIParser {
*
* @param uri the uri
*
- * @return <tt>null</tt> if not possible to parse, if the uri is
already normalized, then
+ * @return <code>null</code> if not possible to parse, if the uri is
already normalized, then
* {@link #URI_ALREADY_NORMALIZED} is returned, or an array[3]
with scheme,path,query
*/
public static String[] fastParseUri(String uri) {
@@ -50,7 +50,7 @@ public final class CamelURIParser {
/**
* Parses the URI.
*
- * If this parser cannot parse the uri then <tt>null</tt> is returned. And
instead the follow code can be used:
+ * If this parser cannot parse the uri then <code>null</code> is returned.
And instead the follow code can be used:
*
* <pre>
* URI u = new URI(UnsafeUriCharactersEncoder.encode(uri, true));
@@ -58,7 +58,7 @@ public final class CamelURIParser {
*
* @param uri the uri
*
- * @return <tt>null</tt> if not possible to parse, or an array[3] with
scheme,path,query
+ * @return <code>null</code> if not possible to parse, or an array[3]
with scheme,path,query
*/
public static String[] parseUri(String uri) {
return doParseUri(uri, false);
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
b/core/camel-util/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
index 8919c1140b83..1b1476a2ccd9 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
@@ -33,11 +33,11 @@ import java.util.Set;
/**
* A map that uses case insensitive keys, but preserves the original key cases.
- * <p/>
+ * <p>
* The map uses a custom hash table with case-insensitive hashing and
comparison, providing O(1) for {@code get},
* {@code put}, {@code containsKey} and {@code remove} operations without
allocating temporary strings. Entries are
* stored in insertion order.
- * <p/>
+ * <p>
* This map is <b>not</b> designed to be thread safe as concurrent access to
it is not supposed to be performed by the
* Camel routing engine.
*/
@@ -60,7 +60,7 @@ public class CaseInsensitiveMap extends AbstractMap<String,
Object> implements S
* one of these strings, the canonical reference from this set is stored
instead of the caller's string, reducing
* memory when many map instances carry the same headers (e.g.
deserialized exchanges). A key that only differs in
* case is stored as given, as the map preserves the original key cases.
- * <p/>
+ * <p>
* This method is intended to be called once during framework startup.
*/
public static void registerKnownKeys(Collection<String> keys) {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
index 83d886cce3d5..9f16b5007970 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/CollectionHelper.java
@@ -48,7 +48,7 @@ public final class CollectionHelper {
* Returns the size of the collection if it can be determined to be a
collection
*
* @param value the collection
- * @return the size, or <tt>null</tt> if not a collection
+ * @return the size, or <code>null</code> if not a collection
*/
public static Integer size(Object value) {
if (value != null) {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/EscapeHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/EscapeHelper.java
index 4e5221b251ef..8b7672836d30 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/EscapeHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/EscapeHelper.java
@@ -41,7 +41,7 @@ public final class EscapeHelper {
* Resolves the escape kind from its name (case-insensitive).
*
* @param name the name such as html, xml, json, js, sql, or url
- * @return the kind, or <tt>null</tt> if the name is not a
supported kind
+ * @return the kind, or <code>null</code> if the name is not a
supported kind
*/
public static Kind fromName(String name) {
if (name == null) {
@@ -63,7 +63,7 @@ public final class EscapeHelper {
* Escapes the value according to this kind.
*
* @param value the value to escape
- * @return the escaped value, or <tt>null</tt> if the value is
<tt>null</tt>
+ * @return the escaped value, or <code>null</code> if the value
is <code>null</code>
*/
public String escape(String value) {
return EscapeHelper.escape(this, value);
@@ -78,7 +78,7 @@ public final class EscapeHelper {
*
* @param kind the escape kind
* @param value the value to escape
- * @return the escaped value, or <tt>null</tt> if the value is
<tt>null</tt>
+ * @return the escaped value, or <code>null</code> if the value is
<code>null</code>
*/
public static String escape(Kind kind, String value) {
if (value == null) {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/FilePathResolver.java
b/core/camel-util/src/main/java/org/apache/camel/util/FilePathResolver.java
index bfc8d156f70b..6d9c62654129 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/FilePathResolver.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/FilePathResolver.java
@@ -26,13 +26,13 @@ public final class FilePathResolver {
/**
* Resolves the path.
- * <p/>
+ * <p>
* The pattern is:
* <ul>
- * <li><tt>${env:key}</tt> or <tt>${env.key}</tt> for environment
variables.</li>
- * <li><tt>${key}</tt> for JVM system properties.</li>
+ * <li><code>${env:key}</code> or <code>${env.key}</code> for environment
variables.</li>
+ * <li><code>${key}</code> for JVM system properties.</li>
* </ul>
- * For example: <tt>${env.KARAF_HOME}/data/logs</tt>
+ * For example: <code>${env.KARAF_HOME}/data/logs</code>
*
* @param path the path
* @return the resolved path
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/FileUtil.java
b/core/camel-util/src/main/java/org/apache/camel/util/FileUtil.java
index 17897bf67d54..3ef933b52637 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/FileUtil.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/FileUtil.java
@@ -238,7 +238,7 @@ public final class FileUtil {
}
/**
- * Returns only the leading path (returns <tt>null</tt> if no path)
+ * Returns only the leading path (returns <code>null</code> if no path)
*/
public static String onlyPath(String name) {
if (name == null) {
@@ -271,7 +271,7 @@ public final class FileUtil {
}
/**
- * Compacts a path by stacking it and reducing <tt>..</tt>, and uses OS
specific file separators (eg
+ * Compacts a path by stacking it and reducing <code>..</code>, and uses
OS specific file separators (eg
* {@link java.io.File#separator}).
*/
public static String compactPath(String path) {
@@ -279,14 +279,14 @@ public final class FileUtil {
}
/**
- * Compacts a path by stacking it and reducing <tt>..</tt>, and uses the
given separator.
+ * Compacts a path by stacking it and reducing <code>..</code>, and uses
the given separator.
*/
public static String compactPath(String path, char separator) {
return compactPath(path, String.valueOf(separator));
}
/**
- * Compacts a file path by stacking it and reducing <tt>..</tt>, and uses
the given separator.
+ * Compacts a file path by stacking it and reducing <code>..</code>, and
uses the given separator.
*/
public static String compactPath(String path, String separator) {
if (path == null) {
@@ -408,7 +408,7 @@ public final class FileUtil {
* @param from the from file
* @param to the to file
* @param copyAndDeleteOnRenameFail whether to fallback and do copy and
delete, if renameTo fails
- * @return <tt>true</tt> if the file was
renamed, otherwise <tt>false</tt>
+ * @return <code>true</code> if the file was
renamed, otherwise <code>false</code>
* @throws java.io.IOException is thrown if error renaming file
*/
public static boolean renameFile(File from, File to, boolean
copyAndDeleteOnRenameFail) throws IOException {
@@ -421,7 +421,7 @@ public final class FileUtil {
* @param from the from file
* @param to the to file
* @param copyAndDeleteOnRenameFail whether to fallback and do copy and
delete, if renameTo fails
- * @return <tt>true</tt> if the file was
renamed, otherwise <tt>false</tt>
+ * @return <code>true</code> if the file was
renamed, otherwise <code>false</code>
* @throws java.io.IOException is thrown if error renaming file
*/
public static boolean renameFile(Path from, Path to, boolean
copyAndDeleteOnRenameFail) throws IOException {
@@ -476,7 +476,7 @@ public final class FileUtil {
*
* @param from the file to be renamed
* @param to the new target file
- * @return <tt>true</tt> if the file was renamed successfully,
otherwise <tt>false</tt>
+ * @return <code>true</code> if the file was renamed
successfully, otherwise <code>false</code>
* @throws IOException If an I/O error occurs during copy or delete
operations.
*/
public static boolean renameFileUsingCopy(File from, File to) throws
IOException {
@@ -489,7 +489,7 @@ public final class FileUtil {
*
* @param from the file to be renamed
* @param to the new target file
- * @return <tt>true</tt> if the file was renamed successfully,
otherwise <tt>false</tt>
+ * @return <code>true</code> if the file was renamed
successfully, otherwise <code>false</code>
* @throws IOException If an I/O error occurs during copy or delete
operations.
*/
public static boolean renameFileUsingCopy(Path from, Path to) throws
IOException {
@@ -534,7 +534,7 @@ public final class FileUtil {
/**
* Deletes the file.
- * <p/>
+ * <p>
* This implementation will attempt to delete the file up till three times
with one second delay, which can mitigate
* problems on deleting files on some platforms such as Windows.
*
@@ -546,7 +546,7 @@ public final class FileUtil {
/**
* Deletes the file.
- * <p/>
+ * <p>
* This implementation will attempt to delete the file up till three times
with one second delay, which can mitigate
* problems on deleting files on some platforms such as Windows.
*
@@ -589,12 +589,12 @@ public final class FileUtil {
/**
* Is the given file an absolute file.
- * <p/>
+ * <p>
* Will also work around issue on Windows to consider files on Windows
starting with a \ as absolute files. This
* makes the logic consistent across all OS platforms.
*
* @param file the file
- * @return <tt>true</ff> if it's an absolute path, <tt>false</tt>
otherwise.
+ * @return <code>true</code> if it's an absolute path,
<code>false</code> otherwise.
*/
public static boolean isAbsolute(File file) {
if (isWindows()) {
@@ -611,7 +611,7 @@ public final class FileUtil {
* Creates a new file.
*
* @param file the file
- * @return <tt>true</tt> if created a new file, <tt>false</tt>
otherwise
+ * @return <code>true</code> if created a new file,
<code>false</code> otherwise
* @throws IOException is thrown if error creating the new file
*/
public static boolean createNewFile(File file) throws IOException {
@@ -651,15 +651,21 @@ public final class FileUtil {
}
/**
- * Determines whether the URI has a scheme (e.g. file:, classpath: or
http:)
+ * Determines whether the given path part is a Windows drive (e.g. {@code
C:})
*
- * @param uri the URI
- * @return <tt>true</tt> if the URI starts with a scheme
+ * @param part the path part
+ * @return <code>true</code> if the part is a single letter followed
by a colon
*/
private static boolean isWindowsDrive(String part) {
return part.length() == 2 && part.charAt(1) == ':' &&
Character.isLetter(part.charAt(0));
}
+ /**
+ * Determines whether the URI has a scheme (e.g. file:, classpath: or
http:)
+ *
+ * @param uri the URI
+ * @return <code>true</code> if the URI starts with a scheme
+ */
private static boolean hasScheme(String uri) {
if (uri == null) {
return false;
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
index f2ef6f6d029e..a660a8a7b02f 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
@@ -335,7 +335,7 @@ public final class IOHelper {
* @param channel the file channel
* @param name the name of the resource
* @param log the log to use when reporting warnings, will use this
class's own {@link Logger} if
- * <tt>log == null</tt>
+ * <code>log == null</code>
*/
public static void force(FileChannel channel, String name, Logger log) {
try {
@@ -361,7 +361,7 @@ public final class IOHelper {
* @param os the file output stream
* @param name the name of the resource
* @param log the log to use when reporting warnings, will use this
class's own {@link Logger} if
- * <tt>log == null</tt>
+ * <code>log == null</code>
*/
public static void force(FileOutputStream os, String name, Logger log) {
try {
@@ -389,7 +389,7 @@ public final class IOHelper {
* @param os an underlying FileOutputStream that will to be forced to
disk according to the force parameter
* @param name the name of the resource
* @param log the log to use when reporting warnings, will use this
class's own {@link Logger} if
- * <tt>log == null</tt>
+ * <code>log == null</code>
* @param force forces the FileOutputStream to disk
*/
public static void close(Writer writer, FileOutputStream os, String name,
Logger log, boolean force) {
@@ -419,7 +419,7 @@ public final class IOHelper {
* @param closeable the object to close
* @param name the name of the resource
* @param log the log to use when reporting closure warnings, will
use this class's own {@link Logger} if
- * <tt>log == null</tt>
+ * <code>log == null</code>
*/
public static void close(Closeable closeable, String name, Logger log) {
if (closeable != null) {
@@ -457,7 +457,7 @@ public final class IOHelper {
* @param channel the file channel
* @param name the name of the resource
* @param log the log to use when reporting warnings, will use this
class's own {@link Logger} if
- * <tt>log == null</tt>
+ * <code>log == null</code>
* @param force forces the file channel to disk
*/
public static void close(FileChannel channel, String name, Logger log,
boolean force) {
@@ -521,9 +521,9 @@ public final class IOHelper {
/**
* Loads the entire stream into memory as a String and returns it.
- * <p/>
- * <b>Notice:</b> This implementation appends a <tt>\n</tt> as line
terminator at the of the text.
- * <p/>
+ * <p>
+ * <b>Notice:</b> This implementation appends a <code>\n</code> as line
terminator at the end of the text.
+ * <p>
* Warning, don't use for crazy big streams :)
*/
public static String loadText(InputStream in) throws IOException {
@@ -532,7 +532,7 @@ public final class IOHelper {
/**
* Loads the entire stream into memory as a String and returns it.
- * <p/>
+ * <p>
* Warning, don't use for crazy big streams :)
*/
public static String loadText(InputStream in, boolean newLine) throws
IOException {
@@ -562,7 +562,7 @@ public final class IOHelper {
/**
* Loads the entire stream into memory as a String and returns the given
line number.
- * <p/>
+ * <p>
* Warning, don't use for crazy big streams :)
*/
public static String loadTextLine(InputStream in, int lineNumber) throws
IOException {
@@ -628,7 +628,7 @@ public final class IOHelper {
* Get the charset name from the content type string
*
* @param contentType the content type
- * @return the charset name, or <tt>UTF-8</tt> if no found (or
the charset parameter is empty)
+ * @return the charset name, or <code>UTF-8</code> if no found
(or the charset parameter is empty)
*/
public static String getCharsetNameFromContentType(String contentType) {
// try optimized for direct match without using splitting
@@ -789,7 +789,7 @@ public final class IOHelper {
/**
* Encodes the next chunk of characters if all the encoded bytes have
been read.
*
- * @return <tt>false</tt> if the end of the reader has been reached
+ * @return <code>false</code> if the end of the reader has been reached
*/
private boolean fill() throws IOException {
while (!bytes.hasRemaining()) {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/InetAddressUtil.java
b/core/camel-util/src/main/java/org/apache/camel/util/InetAddressUtil.java
index 97b74dbb16be..a411351a88d9 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/InetAddressUtil.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/InetAddressUtil.java
@@ -30,17 +30,17 @@ public final class InetAddressUtil {
/**
* When using the {@link java.net.InetAddress#getHostName()} method in an
environment where neither a proper DNS
- * lookup nor an <tt>/etc/hosts</tt> entry exists for a given host, the
following exception will be thrown:
- * <p/>
+ * lookup nor an <code>/etc/hosts</code> entry exists for a given host,
the following exception will be thrown:
+ * <p>
* <code>
* java.net.UnknownHostException: <hostname>: <hostname>
* at java.net.InetAddress.getLocalHost(InetAddress.java:1425)
* ...
* </code>
- * <p/>
+ * <p>
* Instead of just throwing an UnknownHostException and giving up, this
method grabs a suitable hostname from the
* exception and prevents the exception from being thrown. If a suitable
hostname cannot be acquired from the
- * exception, only then is the <tt>UnknownHostException</tt> thrown.
+ * exception, only then is the <code>UnknownHostException</code> thrown.
*
* @return the hostname
* @throws UnknownHostException is thrown if hostname could not be resolved
@@ -59,19 +59,19 @@ public final class InetAddressUtil {
/**
* When using the {@link java.net.InetAddress#getHostName()} method in an
environment where neither a proper DNS
- * lookup nor an <tt>/etc/hosts</tt> entry exists for a given host, the
following exception will be thrown:
- * <p/>
+ * lookup nor an <code>/etc/hosts</code> entry exists for a given host,
the following exception will be thrown:
+ * <p>
* <code>
* java.net.UnknownHostException: <hostname>: <hostname>
* at java.net.InetAddress.getLocalHost(InetAddress.java:1425)
* ...
* </code>
- * <p/>
+ * <p>
* Instead of just throwing an UnknownHostException and giving up, this
method grabs a suitable hostname from the
* exception and prevents the exception from being thrown. If a suitable
hostname cannot be acquired from the
- * exception, then <tt>null</tt> is returned
+ * exception, then <code>null</code> is returned
*
- * @return the hostname, or <tt>null</tt> if not possible to resolve
+ * @return the hostname, or <code>null</code> if not possible to resolve
*/
public static String getLocalHostNameSafe() {
try {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
index 65e8b4f2e68e..e952dcfdde24 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/MimeTypeHelper.java
@@ -41,7 +41,7 @@ public class MimeTypeHelper {
* Probes the file name to determine the mime type (such as
application/xml, text/plain).
*
* @param fileName the file name, such as order.xml
- * @return the mime type, or <tt>null</tt> if not possible to
determine.
+ * @return the mime type, or <code>null</code> if not possible to
determine.
*/
public static String probeMimeType(String fileName) {
String answer = null;
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java
index 9cc98abd6488..d2316a0981a6 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java
@@ -142,7 +142,7 @@ public final class ObjectHelper {
}
/**
- * Asserts whether the value is <b>not</b> <tt>null</tt>
+ * Asserts whether the value is <b>not</b> <code>null</code>
*
* @param value the value to test
* @param name the key that resolved the value
@@ -173,7 +173,7 @@ public final class ObjectHelper {
}
/**
- * Asserts whether the value is <b>not</b> <tt>null</tt>
+ * Asserts whether the value is <b>not</b> <code>null</code>
*
* @param value the value to test
* @param on additional description to indicate
where this problem occurred (appended as
@@ -193,9 +193,9 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <tt>null</tt> or an empty string or an empty
collection/map.
+ * Tests whether the value is <code>null</code> or a blank string (empty
or only whitespace).
*
- * @param value the value, if its a String it will be tested for text
length as well
+ * @param value the value to test
* @return true if empty
*/
public static boolean isEmpty(String value) {
@@ -203,7 +203,7 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <tt>null</tt> or an an empty collection
+ * Tests whether the value is <code>null</code> or an empty collection
*
* @param value the value to test
* @return true if empty
@@ -213,7 +213,7 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <tt>null</tt> or an an empty map
+ * Tests whether the value is <code>null</code> or an empty map
*
* @param value the value to test
* @return true if empty
@@ -223,7 +223,7 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <tt>null</tt>, an empty string or an empty
collection/map.
+ * Tests whether the value is <code>null</code>, an empty string or an
empty collection/map.
*
* @param value the value, if its a String it will be tested for text
length as well
* @return true if empty
@@ -243,7 +243,7 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <b>not</b> <tt>null</tt>, an empty string or
an empty collection/map.
+ * Tests whether the value is <b>not</b> <code>null</code>, an empty
string or an empty collection/map.
*
* @param value the value, if its a String it will be tested for text
length as well
* @return true if <b>not</b> empty
@@ -253,9 +253,9 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <b>not</b> <tt>null</tt> or an empty string
+ * Tests whether the value is <b>not</b> <code>null</code> and <b>not</b>
a blank string
*
- * @param value the value, if its a String it will be tested for text
length as well
+ * @param value the value to test
* @return true if <b>not</b> empty
*/
public static boolean isNotEmpty(String value) {
@@ -263,30 +263,30 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <tt>null</tt> or an an empty collection
+ * Tests whether the value is <b>not</b> <code>null</code> and <b>not</b>
an empty collection
*
* @param value the value to test
- * @return true if empty
+ * @return true if <b>not</b> empty
*/
public static boolean isNotEmpty(Collection<?> value) {
return !isEmpty(value);
}
/**
- * Tests whether the value is <tt>null</tt> or an an empty map
+ * Tests whether the value is <b>not</b> <code>null</code> and <b>not</b>
an empty map
*
* @param value the value to test
- * @return true if empty
+ * @return true if <b>not</b> empty
*/
public static boolean isNotEmpty(Map<?, ?> value) {
return !isEmpty(value);
}
/**
- * Returns the first non null object <tt>null</tt>.
+ * Returns the first non-null object.
*
* @param values the values
- * @return an Optional
+ * @return an Optional with the first non-null object, or an empty
Optional if all the values are null
*/
public static Optional<Object> firstNotNull(Object... values) {
for (Object value : values) {
@@ -299,7 +299,7 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <tt>null</tt>, an empty string, an empty
collection or a map
+ * Tests whether the value is <code>null</code>, an empty string, an empty
collection or a map
*
* @param value the value, if its a String it will be tested for text
length as well
* @param supplier the supplier, the supplier to be used to get a value if
value is null
@@ -314,7 +314,7 @@ public final class ObjectHelper {
}
/**
- * Tests whether the value is <b>not</b> <tt>null</tt>, an empty string,
an empty collection or a map
+ * Tests whether the value is <b>not</b> <code>null</code>, an empty
string, an empty collection or a map
*
* @param value the value, if its a String it will be tested for text
length as well
* @param consumer the consumer, the operation to be executed against
value if not empty
@@ -329,7 +329,7 @@ public final class ObjectHelper {
* Returns the predicate matching boolean on a {@link List} result set
where if the first element is a boolean its
* value is used otherwise this method returns true if the collection is
not empty
*
- * @return <tt>true</tt> if the first element is a boolean, and its value
is true or if the list is non-empty
+ * @return <code>true</code> if the first element is a boolean, and its
value is true or if the list is non-empty
*/
public static boolean matches(List<?> list) {
if (!list.isEmpty()) {
@@ -408,7 +408,7 @@ public final class ObjectHelper {
* class
*
* @param name the name of the class to load
- * @return the class or <tt>null</tt> if it could not be loaded
+ * @return the class or <code>null</code> if it could not be loaded
*/
public static Class<?> loadClass(String name) {
return loadClass(name, ObjectHelper.class.getClassLoader());
@@ -419,7 +419,7 @@ public final class ObjectHelper {
*
* @param name the name of the class to load
* @param loader the class loader to use after the thread context class
loader
- * @return the class or <tt>null</tt> if it could not be loaded
+ * @return the class or <code>null</code> if it could not be loaded
*/
public static Class<?> loadClass(String name, ClassLoader loader) {
return loadClass(name, loader, false);
@@ -430,8 +430,8 @@ public final class ObjectHelper {
*
* @param name the name of the class to load
* @param loader the class loader to use after the thread context
class loader
- * @param needToWarn when <tt>true</tt> logs a warning when a class with
the given name could not be loaded
- * @return the class or <tt>null</tt> if it could not be loaded
+ * @param needToWarn when <code>true</code> logs a warning when a class
with the given name could not be loaded
+ * @return the class or <code>null</code> if it could not be
loaded
*/
public static Class<?> loadClass(String name, ClassLoader loader, boolean
needToWarn) {
// must clean the name so its pure java name, eg removing \n or
whatever people can do in the Spring XML
@@ -491,7 +491,7 @@ public final class ObjectHelper {
* Load a simple type
*
* @param name the name of the class to load
- * @return the class or <tt>null</tt> if it could not be loaded
+ * @return the class or <code>null</code> if it could not be loaded
*/
public static Class<?> loadSimpleType(String name) {
// special for byte[] or Object[] as its common to use
@@ -754,12 +754,12 @@ public final class ObjectHelper {
/**
* Tests whether the target method overrides the source method.
- * <p/>
+ * <p>
* Tests whether they have the same name, return type, and parameter list.
*
* @param source the source method
* @param target the target method
- * @return <tt>true</tt> if it override, <tt>false</tt> otherwise
+ * @return <code>true</code> if it override, <code>false</code>
otherwise
*/
public static boolean isOverridingMethod(Method source, Method target) {
return isOverridingMethod(source, target, true);
@@ -767,14 +767,14 @@ public final class ObjectHelper {
/**
* Tests whether the target method overrides the source method.
- * <p/>
+ * <p>
* Tests whether they have the same name, return type, and parameter list.
*
* @param source the source method
* @param target the target method
- * @param exact <tt>true</tt> if the override must be exact same types,
<tt>false</tt> if the types should be
- * assignable
- * @return <tt>true</tt> if it override, <tt>false</tt> otherwise
+ * @param exact <code>true</code> if the override must be exact same
types, <code>false</code> if the types should
+ * be assignable
+ * @return <code>true</code> if it override, <code>false</code>
otherwise
*/
public static boolean isOverridingMethod(Method source, Method target,
boolean exact) {
return isOverridingMethod(target.getDeclaringClass(), source, target,
exact);
@@ -782,15 +782,15 @@ public final class ObjectHelper {
/**
* Tests whether the target method overrides the source method from the
inheriting class.
- * <p/>
+ * <p>
* Tests whether they have the same name, return type, and parameter list.
*
* @param inheritingClass the class inheriting the target method
overriding the source method
* @param source the source method
* @param target the target method
- * @param exact <tt>true</tt> if the override must be exact
same types, <tt>false</tt> if the types
- * should be assignable
- * @return <tt>true</tt> if it override, <tt>false</tt>
otherwise
+ * @param exact <code>true</code> if the override must be exact
same types, <code>false</code> if the
+ * types should be assignable
+ * @return <code>true</code> if it override,
<code>false</code> otherwise
*/
public static boolean isOverridingMethod(Class<?> inheritingClass, Method
source, Method target, boolean exact) {
@@ -1094,7 +1094,7 @@ public final class ObjectHelper {
*
* @param instance the instance
* @param type the annotation
- * @return the annotation, or <tt>null</tt> if the instance does
not have the given annotation
+ * @return the annotation, or <code>null</code> if the instance
does not have the given annotation
*/
public static <A extends Annotation> A getAnnotation(Object instance,
Class<A> type) {
return instance.getClass().getAnnotation(type);
@@ -1105,7 +1105,7 @@ public final class ObjectHelper {
*
* @param instance the instance
* @param type the annotation
- * @return the annotation, or <tt>null</tt> if the instance does
not have the given annotation
+ * @return the annotation, or <code>null</code> if the instance
does not have the given annotation
*/
public static <A extends Annotation> A getAnnotationDeep(Object instance,
Class<A> type) {
Class<?> clazz = instance.getClass();
@@ -1254,15 +1254,15 @@ public final class ObjectHelper {
/**
* Retrieves the given exception type from the exception.
- * <p/>
+ * <p>
* Is used to get the caused exception that typically have been wrapped in
some sort of Camel wrapper exception
- * <p/>
+ * <p>
* The strategy is to look in the exception hierarchy to find the first
given cause that matches the type. Will
* start from the bottom (the real cause) and walk upwards.
*
* @param type the exception type wanted to retrieve
* @param exception the caused exception
- * @return the exception found (or <tt>null</tt> if not found in
the exception hierarchy)
+ * @return the exception found (or <code>null</code> if not
found in the exception hierarchy)
*/
public static <T> T getException(Class<T> type, Throwable exception) {
if (exception == null) {
@@ -1296,7 +1296,7 @@ public final class ObjectHelper {
*
* @param clazz the class
* @param name the name of the field to lookup
- * @return the value of the constant field, or <tt>null</tt> if not
found
+ * @return the value of the constant field, or <code>null</code> if
not found
*/
public static String lookupConstantFieldValue(Class<?> clazz, String name)
{
if (clazz == null) {
@@ -1327,7 +1327,7 @@ public final class ObjectHelper {
* Is the given value a numeric NaN type
*
* @param value the value
- * @return <tt>true</tt> if its a {@link Float#NaN} or {@link
Double#NaN}.
+ * @return <code>true</code> if its a {@link Float#NaN} or {@link
Double#NaN}.
*/
public static boolean isNaN(Object value) {
return value instanceof Float floatValue && floatValue.isNaN()
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/OgnlHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/OgnlHelper.java
index a37d5400ffa2..988953437972 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/OgnlHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/OgnlHelper.java
@@ -34,11 +34,11 @@ public final class OgnlHelper {
/**
* Tests whether or not the given String is a Camel OGNL expression.
- * <p/>
+ * <p>
* An expression is considered an OGNL expression when it contains either
one of the following chars: . or [
*
* @param expression the String
- * @return <tt>true</tt> if a Camel OGNL expression, otherwise
<tt>false</tt>.
+ * @return <code>true</code> if a Camel OGNL expression,
otherwise <code>false</code>.
*/
public static boolean isValidOgnlExpression(String expression) {
if (expression == null || expression.isEmpty()) {
@@ -108,7 +108,7 @@ public final class OgnlHelper {
* Tests whether or not the given Camel OGNL expression is using the null
safe operator or not.
*
* @param ognlExpression the Camel OGNL expression
- * @return <tt>true</tt> if the null safe operator is used,
otherwise <tt>false</tt>.
+ * @return <code>true</code> if the null safe operator is
used, otherwise <code>false</code>.
*/
public static boolean isNullSafeOperator(String ognlExpression) {
return ognlExpression.startsWith("?");
@@ -116,7 +116,7 @@ public final class OgnlHelper {
/**
* Removes any leading operators from the Camel OGNL expression.
- * <p/>
+ * <p>
* Will remove any leading of the following chars: ? or .
*
* @param ognlExpression the Camel OGNL expression
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/OrderedLocationProperties.java
b/core/camel-util/src/main/java/org/apache/camel/util/OrderedLocationProperties.java
index 21d8d5f8835a..f68db9e4ebff 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/OrderedLocationProperties.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/OrderedLocationProperties.java
@@ -69,7 +69,7 @@ public final class OrderedLocationProperties extends
BaseOrderedProperties {
* Gets the location from where the property was resolved
*
* @param key the property key
- * @return the location, or <tt>null</tt> if not possible to determine
the location.
+ * @return the location, or <code>null</code> if not possible to
determine the location.
*/
public String getLocation(Object key) {
return locations.get(key);
@@ -79,7 +79,7 @@ public final class OrderedLocationProperties extends
BaseOrderedProperties {
* Gets the default value of the property, if a default value exists
*
* @param key the property key
- * @return the default value, or <tt>null</tt> if not possible to
determine the default value.
+ * @return the default value, or <code>null</code> if not possible to
determine the default value.
*/
public Object getDefaultValue(Object key) {
return defaultValues.get(key);
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/OrderedProperties.java
b/core/camel-util/src/main/java/org/apache/camel/util/OrderedProperties.java
index 3ccc097e5448..f283c5c507f8 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/OrderedProperties.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/OrderedProperties.java
@@ -20,7 +20,7 @@ import java.util.Properties;
/**
* This class is an ordered {@link Properties} where the key/values are stored
in the order they are added or loaded.
- * <p/>
+ * <p>
* Note: This implementation is only intended as implementation detail for the
Camel properties component, and has only
* been designed to provide the needed functionality. The complex logic for
loading properties has been kept from the
* JDK {@link Properties} class.
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
index 1f89bf6845db..f88909415c9f 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/ReflectionHelper.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
/**
* Helper for working with reflection on classes.
- * <p/>
+ * <p>
* This code is based on org.apache.camel.spring.util.ReflectionUtils class.
*/
public final class ReflectionHelper {
@@ -118,7 +118,7 @@ public final class ReflectionHelper {
/**
* Perform the given callback operation on all matching methods of the
given class and superclasses (or given
* interface and super-interfaces).
- * <p/>
+ * <p>
* <b>Important:</b> This method does not take the {@link
java.lang.reflect.Method#isBridge() bridge methods} into
* account.
*
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/StopWatch.java
b/core/camel-util/src/main/java/org/apache/camel/util/StopWatch.java
index cb46a16ad35b..71261fc7e3dc 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/StopWatch.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/StopWatch.java
@@ -20,7 +20,7 @@ import java.util.concurrent.TimeUnit;
/**
* A very simple stop watch.
- * <p/>
+ * <p>
* This implementation is not thread safe and can only time one task at any
given time.
*/
public final class StopWatch {
@@ -62,7 +62,7 @@ public final class StopWatch {
/**
* Returns the time taken in millis.
*
- * @return time in millis, or <tt>0</tt> if not started yet.
+ * @return time in millis, or <code>0</code> if not started yet.
*/
public long taken() {
if (start > 0) {
@@ -75,7 +75,7 @@ public final class StopWatch {
/**
* Returns the time taken in millis and restarts the timer.
*
- * @return time in millis, or <tt>0</tt> if not started yet.
+ * @return time in millis, or <code>0</code> if not started yet.
*/
public long takenAndRestart() {
long answer = taken();
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
index 08b4cb7f82a9..2ae906042a22 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/StringHelper.java
@@ -183,7 +183,7 @@ public final class StringHelper {
* Whether the string starts and ends with either single or double quotes.
*
* @param s the string
- * @return <tt>true</tt> if the string starts and ends with either
single or double quotes.
+ * @return <code>true</code> if the string starts and ends with either
single or double quotes.
*/
public static boolean isQuoted(String s) {
return isSingleQuoted(s) || isDoubleQuoted(s);
@@ -193,7 +193,7 @@ public final class StringHelper {
* Whether the string starts and ends with single quotes.
*
* @param s the string
- * @return <tt>true</tt> if the string starts and ends with single
quotes.
+ * @return <code>true</code> if the string starts and ends with single
quotes.
*/
public static boolean isSingleQuoted(String s) {
if (ObjectHelper.isEmpty(s)) {
@@ -211,7 +211,7 @@ public final class StringHelper {
* Whether the string starts and ends with double quotes.
*
* @param s the string
- * @return <tt>true</tt> if the string starts and ends with double
quotes.
+ * @return <code>true</code> if the string starts and ends with double
quotes.
*/
public static boolean isDoubleQuoted(String s) {
if (ObjectHelper.isEmpty(s)) {
@@ -265,7 +265,7 @@ public final class StringHelper {
* Determines if the string has at least one letter in upper case
*
* @param text the text
- * @return <tt>true</tt> if at least one letter is upper case,
<tt>false</tt> otherwise
+ * @return <code>true</code> if at least one letter is upper case,
<code>false</code> otherwise
*/
public static boolean hasUpperCase(String text) {
if (text == null) {
@@ -303,7 +303,7 @@ public final class StringHelper {
*
* @param expression the expression
* @param language the name of the language, such as simple
- * @return <tt>true</tt> if the expression contains the start
token, <tt>false</tt> otherwise
+ * @return <code>true</code> if the expression contains the
start token, <code>false</code> otherwise
*/
public static boolean hasStartToken(String expression, String language) {
if (expression == null) {
@@ -324,7 +324,7 @@ public final class StringHelper {
/**
* Replaces the first from token in the given input string.
- * <p/>
+ * <p>
* This implementation is not recursive, not does it check for tokens in
the replacement string. If from or to is
* null, then the input string is returned as-is
*
@@ -718,7 +718,7 @@ public final class StringHelper {
*
* @param text the text
* @param after the token
- * @return the text after the token, or <tt>null</tt> if text does
not contain the token
+ * @return the text after the token, or <code>null</code> if text
does not contain the token
*/
public static String after(String text, String after) {
if (text == null) {
@@ -766,7 +766,7 @@ public final class StringHelper {
*
* @param text the text
* @param after the token
- * @return the text after the token, or <tt>null</tt> if text does
not contain the token
+ * @return the text after the token, or <code>null</code> if text
does not contain the token
*/
public static String afterLast(String text, String after) {
if (text == null) {
@@ -797,7 +797,7 @@ public final class StringHelper {
*
* @param text the text
* @param before the token
- * @return the text before the token, or <tt>null</tt> if text does
not contain the token
+ * @return the text before the token, or <code>null</code> if text
does not contain the token
*/
public static String before(String text, String before) {
if (text == null) {
@@ -862,7 +862,7 @@ public final class StringHelper {
*
* @param text the text
* @param before the token
- * @return the text before the token, or <tt>null</tt> if the text
does not contain the token
+ * @return the text before the token, or <code>null</code> if the
text does not contain the token
*/
public static String beforeLast(String text, String before) {
if (text == null) {
@@ -892,7 +892,7 @@ public final class StringHelper {
* @param text the text
* @param after the before token
* @param before the after token
- * @return the text between the tokens, or <tt>null</tt> if the
text does not contain the tokens
+ * @return the text between the tokens, or <code>null</code> if the
text does not contain the tokens
*/
public static String between(final String text, String after, String
before) {
String ret = after(text, after);
@@ -950,17 +950,17 @@ public final class StringHelper {
/**
* Returns the string between the most outer pair of tokens
- * <p/>
+ * <p>
* The number of token pairs must be even, e.g., there must be same number
of before and after tokens, otherwise
- * <tt>null</tt> is returned
- * <p/>
+ * <code>null</code> is returned
+ * <p>
* This implementation skips matching when the text is either single or
double-quoted. For example:
- * <tt>${body.matches("foo('bar')")</tt> Will not match the parenthesis
from the quoted text.
+ * <code>${body.matches("foo('bar')")</code> Will not match the
parenthesis from the quoted text.
*
* @param text the text
* @param after the before token
* @param before the after token
- * @return the text between the outer most tokens, or <tt>null</tt>
if text does not contain the tokens
+ * @return the text between the outer most tokens, or
<code>null</code> if text does not contain the tokens
*/
public static String betweenOuterPair(String text, char before, char
after) {
if (text == null) {
@@ -1053,7 +1053,7 @@ public final class StringHelper {
/**
* Cleans the string to a pure Java identifier so we can use it for
loading class names.
- * <p/>
+ * <p>
* Especially from Spring DSL people can have \n \t or other characters
that otherwise would result in
* ClassNotFoundException
*
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java
index 1932d857d994..504f31f9d82b 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java
@@ -96,15 +96,15 @@ public final class StringQuoteHelper {
/**
* Splits the input safely honoring if values is enclosed in quotes.
- * <p/>
+ * <p>
* Though this method does not support double quoting values. A quoted
value must start with the same start and
* ending quote, which is either a single quote or double quote value.
- * <p/>
+ * <p>
* Will <i>trim</i> each split value by default.
*
* @param input the input
* @param separator the separator char to split the input, for example a
comma.
- * @return the input split, or <tt>null</tt> if the input is
null.
+ * @return the input split, or <code>null</code> if the input is
null.
*/
public static String[] splitSafeQuote(String input, char separator) {
return splitSafeQuote(input, separator, true, false);
@@ -112,14 +112,14 @@ public final class StringQuoteHelper {
/**
* Splits the input safely honoring if values is enclosed in quotes.
- * <p/>
+ * <p>
* Though this method does not support double quoting values. A quoted
value must start with the same start and
* ending quote, which is either a single quote or double quote value.
*
* @param input the input
* @param separator the separator char to split the input, for example a
comma.
* @param trim whether to trim each split value
- * @return the input split, or <tt>null</tt> if the input is
null.
+ * @return the input split, or <code>null</code> if the input is
null.
*/
public static String[] splitSafeQuote(String input, char separator,
boolean trim) {
return splitSafeQuote(input, separator, trim, false);
@@ -127,7 +127,7 @@ public final class StringQuoteHelper {
/**
* Splits the input safely honoring if values is enclosed in quotes.
- * <p/>
+ * <p>
* Though this method does not support double quoting values. A quoted
value must start with the same start and
* ending quote, which is either a single quote or double quote value.
*
@@ -135,7 +135,7 @@ public final class StringQuoteHelper {
* @param separator the separator char to split the input, for example a
comma.
* @param trim whether to trim each split value
* @param keepQuotes whether to keep quotes
- * @return the input split, or <tt>null</tt> if the input is
null.
+ * @return the input split, or <code>null</code> if the input
is null.
*/
public static String[] splitSafeQuote(String input, char separator,
boolean trim, boolean keepQuotes) {
return splitSafeQuote(input, separator, trim, keepQuotes, false);
@@ -144,20 +144,21 @@ public final class StringQuoteHelper {
/**
* Splits the input safely honoring if values is enclosed in quotes, and
optionally also if values is enclosed in
* parenthesis or curly brackets.
- * <p/>
+ * <p>
* Though this method does not support double quoting values. A quoted
value must start with the same start and
* ending quote, which is either a single quote or double quote value.
- * <p/>
- * When <tt>nested</tt> is enabled then the separator is not used for
splitting when it is inside <tt>( )</tt> or
- * <tt>{ }</tt> (outside quotes), such as a comma in a simple expression
<tt>${body.substring(0, 3)}</tt>. The input
- * is otherwise split in the same way as when <tt>nested</tt> is disabled.
+ * <p>
+ * When <code>nested</code> is enabled then the separator is not used for
splitting when it is inside
+ * <code>( )</code> or <code>{ }</code> (outside quotes), such as a comma
in a simple expression
+ * <code>${body.substring(0, 3)}</code>. The input is otherwise split in
the same way as when <code>nested</code> is
+ * disabled.
*
* @param input the input
* @param separator the separator char to split the input, for example a
comma.
* @param trim whether to trim each split value
* @param keepQuotes whether to keep quotes
* @param nested whether to not split inside parenthesis and curly
brackets
- * @return the input split, or <tt>null</tt> if the input is
null.
+ * @return the input split, or <code>null</code> if the input
is null.
*/
public static String[] splitSafeQuote(String input, char separator,
boolean trim, boolean keepQuotes, boolean nested) {
if (input == null) {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
b/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
index 411cdd581286..42fdf3c0739d 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/URISupport.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.util;
-import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLEncoder;
@@ -276,7 +275,7 @@ public final class URISupport {
* Extracts the query part of the given uri
*
* @param uri the uri
- * @return the query parameters or <tt>null</tt> if the uri has no
query
+ * @return the query parameters or <code>null</code> if the uri has no
query
*/
public static String extractQuery(String uri) {
if (uri == null) {
@@ -298,10 +297,10 @@ public final class URISupport {
/**
* Parses the query part of the uri (eg the parameters).
- * <p/>
+ * <p>
* The URI parameters will by default be URI encoded. However you can
define a parameter values with the syntax:
- * <tt>key=RAW(value)</tt> which tells Camel to not encode the value, and
use the value as is (eg key=value) and the
- * value has <b>not</b> been encoded.
+ * <code>key=RAW(value)</code> which tells Camel to not encode the value,
and use the value as is (eg key=value) and
+ * the value has <b>not</b> been encoded.
*
* @param uri the uri
* @return the parameters, or an empty map if no
parameters (eg never null)
@@ -316,10 +315,10 @@ public final class URISupport {
/**
* Parses the query part of the uri (eg the parameters).
- * <p/>
+ * <p>
* The URI parameters will by default be URI encoded. However you can
define a parameter values with the syntax:
- * <tt>key=RAW(value)</tt> which tells Camel to not encode the value, and
use the value as is (eg key=value) and the
- * value has <b>not</b> been encoded.
+ * <code>key=RAW(value)</code> which tells Camel to not encode the value,
and use the value as is (eg key=value) and
+ * the value has <b>not</b> been encoded.
*
* @param uri the uri
* @param useRaw whether to force using raw values
@@ -335,10 +334,10 @@ public final class URISupport {
/**
* Parses the query part of the uri (eg the parameters).
- * <p/>
+ * <p>
* The URI parameters will by default be URI encoded. However you can
define a parameter values with the syntax:
- * <tt>key=RAW(value)</tt> which tells Camel to not encode the value, and
use the value as is (eg key=value) and the
- * value has <b>not</b> been encoded.
+ * <code>key=RAW(value)</code> which tells Camel to not encode the value,
and use the value as is (eg key=value) and
+ * the value has <b>not</b> been encoded.
*
* @param uri the uri
* @param useRaw whether to force using raw values
@@ -369,7 +368,7 @@ public final class URISupport {
/**
* Scans RAW tokens in the string and returns the list of pair indexes
which tell where a RAW token starts and ends
* in the string.
- * <p/>
+ * <p>
* This is a companion method with {@link #isRaw(int, List)} and the
returned value is supposed to be used as the
* parameter of that method.
*
@@ -387,13 +386,13 @@ public final class URISupport {
/**
* Tests if the index is within any pair of the start and end indexes
which represent the start and end positions of
* a RAW token.
- * <p/>
+ * <p>
* This is a companion method with {@link #scanRaw(String)} and is
supposed to consume the returned value of that
- * method as the second parameter <tt>pairs</tt>.
+ * method as the second parameter <code>pairs</code>.
*
* @param index the index to be tested
* @param pairs the list of pair indexes which represent the start and
end positions of a RAW token
- * @return <tt>true</tt> if the index is within any pair of the
indexes, <tt>false</tt> otherwise
+ * @return <code>true</code> if the index is within any pair of the
indexes, <code>false</code> otherwise
* @see #scanRaw(String)
* @see #RAW_TOKEN_PREFIX
* @see #RAW_TOKEN_START
@@ -445,8 +444,8 @@ public final class URISupport {
/**
* Traverses the given parameters, and resolve any parameter values which
uses the RAW token syntax:
- * <tt>key=RAW(value)</tt>. This method will then remove the RAW tokens,
and replace the content of the value, with
- * just the value.
+ * <code>key=RAW(value)</code>. This method will then remove the RAW
tokens, and replace the content of the value,
+ * with just the value.
*
* @param parameters the uri parameters
* @see #parseQuery(String)
@@ -460,8 +459,8 @@ public final class URISupport {
/**
* Traverses the given parameters, and resolve any parameter values which
uses the RAW token syntax:
- * <tt>key=RAW(value)</tt>. This method will then remove the RAW tokens,
and replace the content of the value, with
- * just the value.
+ * <code>key=RAW(value)</code>. This method will then remove the RAW
tokens, and replace the content of the value,
+ * with just the value.
*
* @param parameters the uri parameters
* @param onReplace optional function executed when replace the raw value
@@ -545,7 +544,7 @@ public final class URISupport {
/**
* Strips the prefix from the value.
- * <p/>
+ * <p>
* Returns the value as-is if not starting with the prefix.
*
* @param value the value
@@ -566,7 +565,7 @@ public final class URISupport {
/**
* Strips the suffix from the value.
- * <p/>
+ * <p>
* Returns the value as-is if not ending with the prefix.
*
* @param value the value
@@ -653,11 +652,11 @@ public final class URISupport {
/**
* Assembles a query from the given map.
*
- * @param options the map with the options (eg key/value pairs)
- * @param ampersand to use {@code &} for Java code, and {@code
&} for XML
- * @return a query string with {@code
key1=value&key2=value2&...}, or an empty string if there
- * are no options
- * @throws URISyntaxException is thrown if uri has invalid syntax.
+ * @param options the map with the options (eg key/value pairs)
+ * @param ampersand to use {@code &} for Java code, and {@code &} for
XML
+ * @param encode whether to URL encode the query string values
+ * @return a query string with {@code
key1=value&key2=value2&...}, or an empty string if there are no
+ * options
*/
@Deprecated(since = "4.1.0")
public static String createQueryString(Map<String, String> options, String
ampersand, boolean encode) {
@@ -718,7 +717,7 @@ public final class URISupport {
/**
* Creates a URI from the original URI and the remaining parameters
- * <p/>
+ * <p>
* Used by various Camel components
*/
public static URI createRemainingURI(URI originalURI, Map<String, Object>
params) throws URISyntaxException {
@@ -731,15 +730,14 @@ public final class URISupport {
/**
* Appends the given parameters to the given URI.
- * <p/>
+ * <p>
* It keeps the original parameters and if a new parameter is already
defined in {@code originalURI}, it will be
* replaced by its value in {@code newParameters}.
*
- * @param originalURI the original URI
- * @param newParameters the parameters to add
- * @return the URI with all the parameters
- * @throws URISyntaxException is thrown if the uri syntax is
invalid
- * @throws UnsupportedEncodingException is thrown if encoding error
+ * @param originalURI the original URI
+ * @param newParameters the parameters to add
+ * @return the URI with all the parameters
+ * @throws URISyntaxException is thrown if the uri syntax is invalid
*/
public static String appendParametersToURI(String originalURI, Map<String,
Object> newParameters)
throws URISyntaxException {
@@ -752,10 +750,10 @@ public final class URISupport {
/**
* Normalizes the uri by reordering the parameters so they are sorted and
thus we can use the uris for endpoint
* matching.
- * <p/>
+ * <p>
* The URI parameters will by default be URI encoded. However you can
define a parameter values with the syntax:
- * <tt>key=RAW(value)</tt> which tells Camel to not encode the value, and
use the value as is (eg key=value) and the
- * value has <b>not</b> been encoded.
+ * <code>key=RAW(value)</code> which tells Camel to not encode the value,
and use the value as is (eg key=value) and
+ * the value has <b>not</b> been encoded.
*
* @param uri the uri
* @return the normalized uri
@@ -877,7 +875,7 @@ public final class URISupport {
* The fast parser for normalizing Camel endpoint URIs when the URI is not
complex and can be parsed in a much more
* efficient way.
*
- * @return the normalized uri, or <tt>null</tt> if the uri must be
normalized by the complex normalizer
+ * @return the normalized uri, or <code>null</code> if the uri must be
normalized by the complex normalizer
*/
private static String doFastNormalizeUri(String[] parts) throws
URISyntaxException {
String scheme = parts[0];
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
b/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
index 00b42e0161c1..d188aa98d5f0 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
@@ -21,7 +21,7 @@ import java.util.List;
/**
* Encoder for unsafe URI characters.
- * <p/>
+ * <p>
* A good source for details is <a
href="http://en.wikipedia.org/wiki/Url_encode">wikipedia url encode</a> article.
*/
public final class UnsafeUriCharactersEncoder {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableScheduledThreadPoolExecutor.java
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableScheduledThreadPoolExecutor.java
index 5d4ec6968f60..36437b9f65c4 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableScheduledThreadPoolExecutor.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableScheduledThreadPoolExecutor.java
@@ -25,23 +25,25 @@ import java.util.concurrent.ThreadFactory;
/**
* Scheduled thread pool executor that creates {@link RejectableFutureTask}
instead of
* {@link java.util.concurrent.FutureTask} when registering new tasks for
execution.
- * <p/>
+ * <p>
* Instances of {@link RejectableFutureTask} are required to handle {@link
ThreadPoolRejectedPolicy#Abort} policies
* correctly, e.g. notify {@link Callable} and {@link Runnable} tasks when
they are rejected. To be notified of
- * rejection tasks have to implement {@link Rejectable} interface: <br/>
- * <code><pre>
+ * rejection tasks have to implement {@link Rejectable} interface: <br>
+ *
+ * <pre>
* public class RejectableTask implements Runnable, Rejectable {
* @Override
* public void run() {
* // execute task
* }
+ *
* @Override
* public void reject() {
* // do something useful on rejection
* }
* }
- * </pre></code>
- * <p/>
+ * </pre>
+ * <p>
* If the task does not implement {@link Rejectable} interface the behavior is
exactly the same as with ordinary
* {@link ScheduledThreadPoolExecutor}.
*
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableThreadPoolExecutor.java
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableThreadPoolExecutor.java
index 793312b6e4eb..10c4238a9174 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableThreadPoolExecutor.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/RejectableThreadPoolExecutor.java
@@ -27,23 +27,25 @@ import java.util.concurrent.TimeUnit;
/**
* Thread pool executor that creates {@link RejectableFutureTask} instead of
{@link java.util.concurrent.FutureTask}
* when registering new tasks for execution.
- * <p/>
+ * <p>
* Instances of {@link RejectableFutureTask} are required to handle {@link
ThreadPoolRejectedPolicy#Abort} policies
* correctly, e.g. notify {@link Callable} and {@link Runnable} tasks when
they are rejected. To be notified of
- * rejection tasks have to implement {@link Rejectable} interface: <br/>
- * <code><pre>
+ * rejection tasks have to implement {@link Rejectable} interface: <br>
+ *
+ * <pre>
* public class RejectableTask implements Runnable, Rejectable {
* @Override
* public void run() {
* // execute task
* }
+ *
* @Override
* public void reject() {
* // do something useful on rejection
* }
* }
- * </pre></code>
- * <p/>
+ * </pre>
+ * <p>
* If the task does not implement {@link Rejectable} interface the behavior is
exactly the same as with ordinary
* {@link ThreadPoolExecutor}.
*
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
index 1302d0a17f6f..45c099ab35a0 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SizedScheduledExecutorService.java
@@ -35,10 +35,10 @@ import org.slf4j.LoggerFactory;
/**
* A sized {@link ScheduledExecutorService} which will reject executing tasks
if the task queue is full.
- * <p/>
+ * <p>
* The {@link ScheduledThreadPoolExecutor} which is the default implementation
of the {@link ScheduledExecutorService}
* has unbounded task queue, which mean you can keep scheduling tasks which
may cause the system to run out of memory.
- * <p/>
+ * <p>
* This class is a wrapped for {@link ScheduledThreadPoolExecutor} to reject
executing tasks if an upper limit of the
* task queue has been reached.
*/
@@ -289,7 +289,7 @@ public class SizedScheduledExecutorService implements
ScheduledExecutorService {
/**
* Can the task be scheduled or executed?
*
- * @return <tt>true</tt> to accept, <tt>false</tt> to not accept
+ * @return <code>true</code> to accept, <code>false</code> to not accept
*/
protected boolean canScheduleOrExecute() {
if (queueSize <= 0) {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SynchronousExecutorService.java
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SynchronousExecutorService.java
index d64897ae8e5e..472a734a48b1 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SynchronousExecutorService.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/SynchronousExecutorService.java
@@ -23,10 +23,10 @@ import java.util.concurrent.TimeUnit;
/**
* A synchronous {@link java.util.concurrent.ExecutorService} which always
invokes the task in the caller thread (just a
* thread pool facade).
- * <p/>
+ * <p>
* There is no task queue, and no thread pool. The task will thus always be
executed by the caller thread in a fully
* synchronous method invocation.
- * <p/>
+ * <p>
* This implementation is very simple and does not support waiting for tasks
to complete during shutdown.
*/
public class SynchronousExecutorService extends AbstractExecutorService {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
index deb0434a06e0..7706be5f1caf 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
@@ -41,8 +41,8 @@ public final class ThreadHelper {
/**
* Creates a new thread name with the given pattern
- * <p/>
- * See {@link
org.apache.camel.spi.ExecutorServiceManager#setThreadNamePattern(String)} for
supported patterns.
+ * <p>
+ * See {@code
org.apache.camel.spi.ExecutorServiceManager#setThreadNamePattern(String)} for
supported patterns.
*
* @param pattern the pattern
* @param name the name
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadPoolRejectedPolicy.java
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadPoolRejectedPolicy.java
index e80111ede0ee..2b9cecacbe06 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadPoolRejectedPolicy.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/concurrent/ThreadPoolRejectedPolicy.java
@@ -22,11 +22,11 @@ import java.util.concurrent.ThreadPoolExecutor;
/**
* Represent the kinds of options for rejection handlers for thread pools.
- * <p/>
+ * <p>
* These options are used for fine-grained thread pool settings, where you
want to control which handler to use when a
* thread pool cannot execute a new task.
- * <p/>
- * Camel will by default use <tt>CallerRuns</tt>.
+ * <p>
+ * Camel will by default use <code>CallerRuns</code>.
*/
public enum ThreadPoolRejectedPolicy {
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingHelper.java
b/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingHelper.java
index 3080013b8754..efb4612914c1 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingHelper.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingHelper.java
@@ -98,8 +98,8 @@ public final class ThrowingHelper {
}
/**
- * Tests whether the value is <b>not</b> <tt>null</tt>, an empty string,
an empty collection or a map and transform
- * it using the given function.
+ * Tests whether the value is <b>not</b> <code>null</code>, an empty
string, an empty collection or a map and
+ * transform it using the given function.
*
* @param value the value, if its a String it will be tested for text
length as well
* @param function the function to be executed against value if not empty
@@ -114,8 +114,8 @@ public final class ThrowingHelper {
}
/**
- * Tests whether the value is <b>not</b> <tt>null</tt>, an empty string,
an empty collection or a map and transform
- * it using the given function.
+ * Tests whether the value is <b>not</b> <code>null</code>, an empty
string, an empty collection or a map and
+ * transform it using the given function.
*
* @param value the value, if its a String it will be tested for text
length as well
* @param consumer the function to be executed against value if not empty
diff --git
a/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingTriConsumer.java
b/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingTriConsumer.java
index 31e3538dd557..680b43b79051 100644
---
a/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingTriConsumer.java
+++
b/core/camel-util/src/main/java/org/apache/camel/util/function/ThrowingTriConsumer.java
@@ -32,7 +32,6 @@ public interface ThrowingTriConsumer<I1, I2, I3, T extends
Throwable> {
* @param i1 the first argument
* @param i2 the second argument
* @param i3 the third argument
- * @return the function result
* @throws T the exception that may be thrown
*/
void accept(I1 i1, I2 i2, I3 i3) throws T;