mirror of
https://github.com/google/nomulus
synced 2026-02-03 11:32:24 +00:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user