Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 16, 2024
2 parents 8c9195b + 2a51314 commit 08d28f5
Show file tree
Hide file tree
Showing 29 changed files with 121 additions and 123 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # 3.27.0
uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # 3.27.4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@662472033e021d55d94146f66f6058822b0b39fd # 3.27.0
uses: github/codeql-action/autobuild@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # 3.27.4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -82,4 +82,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # 3.27.0
uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # 3.27.4
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ jobs:
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # 3.27.0
uses: github/codeql-action/upload-sarif@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # 3.27.4
with:
sarif_file: results.sarif
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<system>jira</system>
<url>https://issues.apache.org/jira/browse/LANG</url>
</issueManagement>

<scm>
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-lang.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-lang.git</developerConnection>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/apache/commons/lang3/ClassUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ private static boolean useFull(final int runAheadTarget, final int source, final
* </p>
*
* @param classes the class array to convert, may be null or empty
* @return an array which contains for each given class, the primitive class or <b>null</b> if the original class is not
* @return an array which contains for each given class, the primitive class or <strong>null</strong> if the original class is not
* a wrapper class. {@code null} if null input. Empty array if an empty array passed in.
* @see #wrapperToPrimitive(Class)
* @since 2.4
Expand All @@ -1601,11 +1601,11 @@ public static Class<?>[] wrappersToPrimitives(final Class<?>... classes) {
* <p>
* This method is the counter part of {@code primitiveToWrapper()}. If the passed in class is a wrapper class for a
* primitive type, this primitive type will be returned (e.g. {@code Integer.TYPE} for {@code Integer.class}). For other
* classes, or if the parameter is <b>null</b>, the return value is <b>null</b>.
* classes, or if the parameter is <strong>null</strong>, the return value is <strong>null</strong>.
* </p>
*
* @param cls the class to convert, may be <b>null</b>
* @return the corresponding primitive type if {@code cls} is a wrapper class, <b>null</b> otherwise
* @param cls the class to convert, may be <strong>null</strong>
* @return the corresponding primitive type if {@code cls} is a wrapper class, <strong>null</strong> otherwise
* @see #primitiveToWrapper(Class)
* @since 2.4
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/lang3/JavaVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public enum JavaVersion {
* internally.
*
* @param versionStr the Java version as string
* @return the corresponding enumeration constant or <b>null</b> if the
* @return the corresponding enumeration constant or <strong>null</strong> if the
* version is unknown
*/
static JavaVersion get(final String versionStr) {
Expand Down Expand Up @@ -278,7 +278,7 @@ static JavaVersion get(final String versionStr) {
* internally.
*
* @param versionStr the Java version as string
* @return the corresponding enumeration constant or <b>null</b> if the
* @return the corresponding enumeration constant or <strong>null</strong> if the
* version is unknown
*/
static JavaVersion getJavaVersion(final String versionStr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* the algorithms/providers specified in the {@code securerandom.strongAlgorithms} {@link Security} property.
* </p>
* <p>
* Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} <b>which is not cryptographically secure</b>. In addition,
* Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} <strong>which is not cryptographically secure</strong>. In addition,
* instances do not use a cryptographically random seed unless the {@linkplain System#getProperty system property} {@code java.util.secureRandomSeed} is set to
* {@code true}.
* </p>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/lang3/RandomUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* the algorithms/providers specified in the {@code securerandom.strongAlgorithms} {@link Security} property.
* </p>
* <p>
* Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} <b>which is not cryptographically secure</b>. In addition,
* Use {@link #insecure()} to get the singleton instance based on {@link ThreadLocalRandom#current()} <strong>which is not cryptographically secure</strong>. In addition,
* instances do not use a cryptographically random seed unless the {@linkplain System#getProperty system property} {@code java.util.secureRandomSeed} is set to
* {@code true}.
* </p>
Expand Down
54 changes: 27 additions & 27 deletions src/main/java/org/apache/commons/lang3/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,57 +37,57 @@
* {@code null} safe.
*
* <ul>
* <li><b>IsEmpty/IsBlank</b>
* <li><strong>IsEmpty/IsBlank</strong>
* - checks if a String contains text</li>
* <li><b>Trim/Strip</b>
* <li><strong>Trim/Strip</strong>
* - removes leading and trailing whitespace</li>
* <li><b>Equals/Compare</b>
* <li><strong>Equals/Compare</strong>
* - compares two strings in a null-safe manner</li>
* <li><b>startsWith</b>
* <li><strong>startsWith</strong>
* - check if a String starts with a prefix in a null-safe manner</li>
* <li><b>endsWith</b>
* <li><strong>endsWith</strong>
* - check if a String ends with a suffix in a null-safe manner</li>
* <li><b>IndexOf/LastIndexOf/Contains</b>
* <li><strong>IndexOf/LastIndexOf/Contains</strong>
* - null-safe index-of checks
* <li><b>IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut</b>
* <li><strong>IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut</strong>
* - index-of any of a set of Strings</li>
* <li><b>ContainsOnly/ContainsNone/ContainsAny</b>
* <li><strong>ContainsOnly/ContainsNone/ContainsAny</strong>
* - checks if String contains only/none/any of these characters</li>
* <li><b>Substring/Left/Right/Mid</b>
* <li><strong>Substring/Left/Right/Mid</strong>
* - null-safe substring extractions</li>
* <li><b>SubstringBefore/SubstringAfter/SubstringBetween</b>
* <li><strong>SubstringBefore/SubstringAfter/SubstringBetween</strong>
* - substring extraction relative to other strings</li>
* <li><b>Split/Join</b>
* <li><strong>Split/Join</strong>
* - splits a String into an array of substrings and vice versa</li>
* <li><b>Remove/Delete</b>
* <li><strong>Remove/Delete</strong>
* - removes part of a String</li>
* <li><b>Replace/Overlay</b>
* <li><strong>Replace/Overlay</strong>
* - Searches a String and replaces one String with another</li>
* <li><b>Chomp/Chop</b>
* <li><strong>Chomp/Chop</strong>
* - removes the last part of a String</li>
* <li><b>AppendIfMissing</b>
* <li><strong>AppendIfMissing</strong>
* - appends a suffix to the end of the String if not present</li>
* <li><b>PrependIfMissing</b>
* <li><strong>PrependIfMissing</strong>
* - prepends a prefix to the start of the String if not present</li>
* <li><b>LeftPad/RightPad/Center/Repeat</b>
* <li><strong>LeftPad/RightPad/Center/Repeat</strong>
* - pads a String</li>
* <li><b>UpperCase/LowerCase/SwapCase/Capitalize/Uncapitalize</b>
* <li><strong>UpperCase/LowerCase/SwapCase/Capitalize/Uncapitalize</strong>
* - changes the case of a String</li>
* <li><b>CountMatches</b>
* <li><strong>CountMatches</strong>
* - counts the number of occurrences of one String in another</li>
* <li><b>IsAlpha/IsNumeric/IsWhitespace/IsAsciiPrintable</b>
* <li><strong>IsAlpha/IsNumeric/IsWhitespace/IsAsciiPrintable</strong>
* - checks the characters in a String</li>
* <li><b>DefaultString</b>
* <li><strong>DefaultString</strong>
* - protects against a null input String</li>
* <li><b>Rotate</b>
* <li><strong>Rotate</strong>
* - rotate (circular shift) a String</li>
* <li><b>Reverse/ReverseDelimited</b>
* <li><strong>Reverse/ReverseDelimited</strong>
* - reverses a String</li>
* <li><b>Abbreviate</b>
* <li><strong>Abbreviate</strong>
* - abbreviates a string using ellipses or another given String</li>
* <li><b>Difference</b>
* <li><strong>Difference</strong>
* - compares Strings and reports on their differences</li>
* <li><b>LevenshteinDistance</b>
* <li><strong>LevenshteinDistance</strong>
* - the number of changes needed to change one String into another</li>
* </ul>
*
Expand Down Expand Up @@ -5418,7 +5418,7 @@ public static String normalizeSpace(final String str) {
/**
* Finds the n-th index within a CharSequence, handling {@code null}.
* This method uses {@link String#indexOf(String)} if possible.
* <p><b>Note:</b> The code starts looking for a match at the start of the target,
* <p><strong>Note:</strong> The code starts looking for a match at the start of the target,
* incrementing the starting index by one after each successful match
* (unless {@code searchStr} is an empty string in which case the position
* is never incremented and {@code 0} is returned immediately).
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/lang3/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ public int lastIndexOf(final CharSequence seq, final CharSequence searchSeq, fin
}

/**
* The <b>C</b>ase-<b>I</b>nsensitive singleton instance.
* The <strong>C</strong>ase-<strong>I</strong>nsensitive singleton instance.
*/
public static final Strings CI = new CiStrings(true);

/**
* The <b>C</b>ase-<b>S</b>nsensitive singleton instance.
* The <strong>C</strong>ase-<strong>S</strong>nsensitive singleton instance.
*/
public static final Strings CS = new CsStrings(true);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/lang3/SystemUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ public class SystemUtils {
* Holds a class name, on Windows XP this is {@code sun.awt.windows.WToolkit}.
* </p>
* <p>
* <b>On platforms without a GUI, this value is {@code null}.</b>
* <strong>On platforms without a GUI, this value is {@code null}.</strong>
* </p>
* <p>
* Defaults to {@code null} if the runtime does not have security access to read this property or the property does
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
* </p>
*
* <p>
* <b>Note:</b> the default {@link ToStringStyle} will only do a "shallow" formatting, i.e. composed objects are not
* <strong>Note:</strong> the default {@link ToStringStyle} will only do a "shallow" formatting, i.e. composed objects are not
* further traversed. To get "deep" formatting, use an instance of {@link RecursiveToStringStyle}.
* </p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public T get() throws ConcurrentException {
/**
* Returns the {@link ExecutorService} that is actually used for executing
* the background task. This method can be called after {@link #start()}
* (before {@code start()} it returns <b>null</b>). If an external executor
* (before {@code start()} it returns <strong>null</strong>). If an external executor
* was set, this is also the active executor. Otherwise this method returns
* the temporary executor that was created by this object.
*
Expand Down Expand Up @@ -392,8 +392,8 @@ public final synchronized void setExternalExecutor(
* becomes active and invokes the {@link #initialize()} method in a
* background task. A {@link BackgroundInitializer} can be started exactly
* once. The return value of this method determines whether the start was
* successful: only the first invocation of this method returns <b>true</b>,
* following invocations will return <b>false</b>.
* successful: only the first invocation of this method returns <strong>true</strong>,
* following invocations will return <strong>false</strong>.
*
* @return a flag whether the initializer could be started successfully
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public BasicThreadFactory build() {

/**
* Sets the daemon flag for the new {@link BasicThreadFactory}. If this
* flag is set to <b>true</b> the new thread factory will create daemon
* flag is set to <strong>true</strong> the new thread factory will create daemon
* threads.
*
* @param daemon the value of the daemon flag
Expand All @@ -155,9 +155,9 @@ public Builder daemon(final boolean daemon) {
* Sets the naming pattern to be used by the new {@code
* BasicThreadFactory}.
*
* @param namingPattern the naming pattern (must not be <b>null</b>)
* @param namingPattern the naming pattern (must not be <strong>null</strong>)
* @return a reference to this {@link Builder}
* @throws NullPointerException if the naming pattern is <b>null</b>
* @throws NullPointerException if the naming pattern is <strong>null</strong>
*/
public Builder namingPattern(final String namingPattern) {
this.namingPattern = Objects.requireNonNull(namingPattern, "pattern");
Expand Down Expand Up @@ -195,9 +195,9 @@ public void reset() {
* new {@link BasicThreadFactory}.
*
* @param exceptionHandler the {@link UncaughtExceptionHandler} (must not be
* <b>null</b>)
* <strong>null</strong>)
* @return a reference to this {@link Builder}
* @throws NullPointerException if the exception handler is <b>null</b>
* @throws NullPointerException if the exception handler is <strong>null</strong>
*/
public Builder uncaughtExceptionHandler(
final Thread.UncaughtExceptionHandler exceptionHandler) {
Expand All @@ -210,10 +210,10 @@ public Builder uncaughtExceptionHandler(
* BasicThreadFactory}.
*
* @param factory the wrapped {@link ThreadFactory} (must not be
* <b>null</b>)
* <strong>null</strong>)
* @return a reference to this {@link Builder}
* @throws NullPointerException if the passed in {@link ThreadFactory}
* is <b>null</b>
* is <strong>null</strong>
*/
public Builder wrappedFactory(final ThreadFactory factory) {
this.factory = Objects.requireNonNull(factory, "factory");
Expand Down Expand Up @@ -256,9 +256,9 @@ private BasicThreadFactory(final Builder builder) {

/**
* Gets the daemon flag. This flag determines whether newly created
* threads should be daemon threads. If <b>true</b>, this factory object
* threads should be daemon threads. If <strong>true</strong>, this factory object
* calls {@code setDaemon(true)} on the newly created threads. Result can be
* <b>null</b> if no daemon flag was provided at creation time.
* <strong>null</strong> if no daemon flag was provided at creation time.
*
* @return the daemon flag
*/
Expand All @@ -268,7 +268,7 @@ public final Boolean getDaemonFlag() {

/**
* Gets the naming pattern for naming newly created threads. Result can
* be <b>null</b> if no naming pattern was provided.
* be <strong>null</strong> if no naming pattern was provided.
*
* @return the naming pattern
*/
Expand All @@ -278,7 +278,7 @@ public final String getNamingPattern() {

/**
* Gets the priority of the threads created by this factory. Result can
* be <b>null</b> if no priority was specified.
* be <strong>null</strong> if no priority was specified.
*
* @return the priority for newly created threads
*/
Expand All @@ -299,7 +299,7 @@ public long getThreadCount() {

/**
* Gets the {@link UncaughtExceptionHandler} for the threads created by
* this factory. Result can be <b>null</b> if no handler was provided.
* this factory. Result can be <strong>null</strong> if no handler was provided.
*
* @return the {@link UncaughtExceptionHandler}
*/
Expand All @@ -309,7 +309,7 @@ public final Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() {

/**
* Gets the wrapped {@link ThreadFactory}. This factory is used for
* actually creating threads. This method never returns <b>null</b>. If no
* actually creating threads. This method never returns <strong>null</strong>. If no
* {@link ThreadFactory} was passed when this object was created, a default
* thread factory is returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public class CallableBackgroundInitializer<T> extends BackgroundInitializer<T> {
* Creates a new instance of {@link CallableBackgroundInitializer} and sets
* the {@link Callable} to be executed in a background thread.
*
* @param call the {@link Callable} (must not be <b>null</b>)
* @throws IllegalArgumentException if the {@link Callable} is <b>null</b>
* @param call the {@link Callable} (must not be <strong>null</strong>)
* @throws IllegalArgumentException if the {@link Callable} is <strong>null</strong>
*/
public CallableBackgroundInitializer(final Callable<T> call) {
checkCallable(call);
Expand All @@ -86,10 +86,10 @@ public CallableBackgroundInitializer(final Callable<T> call) {
* thread and the {@link ExecutorService} for managing the background
* execution.
*
* @param call the {@link Callable} (must not be <b>null</b>)
* @param call the {@link Callable} (must not be <strong>null</strong>)
* @param exec an external {@link ExecutorService} to be used for task
* execution
* @throws IllegalArgumentException if the {@link Callable} is <b>null</b>
* @throws IllegalArgumentException if the {@link Callable} is <strong>null</strong>
*/
public CallableBackgroundInitializer(final Callable<T> call, final ExecutorService exec) {
super(exec);
Expand All @@ -102,7 +102,7 @@ public CallableBackgroundInitializer(final Callable<T> call, final ExecutorServi
* undefined.
*
* @param callable the object to check
* @throws IllegalArgumentException if the {@link Callable} is <b>null</b>
* @throws IllegalArgumentException if the {@link Callable} is <strong>null</strong>
*/
private void checkCallable(final Callable<T> callable) {
Objects.requireNonNull(callable, "callable");
Expand Down
Loading

0 comments on commit 08d28f5

Please sign in to comment.