mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Replace occurrences of Wrapped.valueOf(...) with Wrapped.parseWrapped(...)
where the value will be immediately unboxed anyway. The change removes small-but-pervasive inefficiencies from creating and immediately discarding instances of the wrapped value, as well as removing unnecessary syntax. More information: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189704431
This commit is contained in:
parent
70e9df7435
commit
d54d546ea3
3 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ public final class RequestParameters {
|
|||
*/
|
||||
public static int extractIntParameter(HttpServletRequest req, String name) {
|
||||
try {
|
||||
return Integer.valueOf(nullToEmpty(req.getParameter(name)));
|
||||
return Integer.parseInt(nullToEmpty(req.getParameter(name)));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new BadRequestException("Expected integer: " + name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue