Make a non-access modifier local variables. (#966)

This commit is contained in:
Arturo Bernal 2022-10-08 22:40:36 +02:00 committed by GitHub
parent b6d39a4257
commit ff733d9d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -631,7 +631,7 @@ public class Functions {
public static void tryWithResources(final FailableRunnable<? extends Throwable> action,
final FailableConsumer<Throwable, ? extends Throwable> errorHandler,
final FailableRunnable<? extends Throwable>... resources) {
org.apache.commons.lang3.function.FailableRunnable<?>[] fr = new org.apache.commons.lang3.function.FailableRunnable[resources.length];
final org.apache.commons.lang3.function.FailableRunnable<?>[] fr = new org.apache.commons.lang3.function.FailableRunnable[resources.length];
Arrays.setAll(fr, i -> () -> resources[i].run());
Failable.tryWithResources(action::run, errorHandler != null ? errorHandler::accept : null, fr);
}

View File

@ -2456,7 +2456,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
* @param startIndex the index to start at, invalid index rounded to edge
* @return the first index of the string, or -1 if not found
*/
public int indexOf(final String str, int startIndex) {
public int indexOf(final String str, final int startIndex) {
return StringUtils.indexOf(this, str, startIndex);
}
@ -2557,7 +2557,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
* @param startIndex the index to start at, invalid index rounded to edge
* @return the last index of the string, or -1 if not found
*/
public int lastIndexOf(final String str, int startIndex) {
public int lastIndexOf(final String str, final int startIndex) {
return StringUtils.lastIndexOf(this, str, startIndex);
}

View File

@ -485,7 +485,7 @@ public class FastDateParser implements DateParser, Serializable {
* @param regex The regular expression to build
* @return The map of string display names to field values
*/
private static Map<String, Integer> appendDisplayNames(final Calendar calendar, Locale locale, final int field,
private static Map<String, Integer> appendDisplayNames(final Calendar calendar, final Locale locale, final int field,
final StringBuilder regex) {
final Map<String, Integer> values = new HashMap<>();
final Locale actualLocale = LocaleUtils.toLocale(locale);