Fix some issues caught by IntelliJ static code analysis

The most common issues were:
* Arrays.asList() shouldn't be called with a single parameter.
* Broken Javadoc @links.
* Unnecessary casts and type declarations.
* Unnecessary unused variable initializations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=230994311
This commit is contained in:
mcilwain 2019-01-25 16:53:20 -08:00 committed by Ben McIlwain
parent 3cf26ff9b6
commit c6e58d3bff
39 changed files with 132 additions and 165 deletions

View file

@ -31,8 +31,8 @@ import javax.annotation.concurrent.NotThreadSafe;
/**
* Exception thrown when a form field contains a bad value.
*
* <p>You can safely throw {@code FormFieldException} from within your validator functions, and
* the field name will automatically be propagated into the exception object for you.
* <p>You can safely throw {@code FormFieldException} from within your validator functions, and the
* field name will automatically be propagated into the exception object for you.
*
* <p>The way that field names work is a bit complicated, because we need to support complex nested
* field names like {@code foo[3].bar}. So what happens is the original exception will be thrown by
@ -41,9 +41,9 @@ import javax.annotation.concurrent.NotThreadSafe;
* name of that component. Then when the exception reaches the user, the {@link #getFieldName()}
* method will produce the fully-qualified field name.
*
* <p>This propagation mechanism is also very important when writing
* {@link FormField.Builder#transform(com.google.common.base.Function) transform} functions, which
* oftentimes will not know the name of the field they're validating.
* <p>This propagation mechanism is also very important when writing {@link
* FormField.Builder#transform} functions, which oftentimes will not know the name of the field
* they're validating.
*/
@NotThreadSafe
@SuppressWarnings("OverrideThrowableToString")