1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Cleanup unnecessary unboxing

Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
This commit is contained in:
Lars Grefer
2019-08-01 23:30:53 +02:00
committed by Josh Cummings
parent 2306d987e9
commit 2056834432
16 changed files with 21 additions and 23 deletions
@@ -104,8 +104,8 @@ public class PortMapperImpl implements PortMapper {
Integer httpPort = Integer.valueOf(entry.getKey());
Integer httpsPort = Integer.valueOf(entry.getValue());
if ((httpPort.intValue() < 1) || (httpPort.intValue() > 65535)
|| (httpsPort.intValue() < 1) || (httpsPort.intValue() > 65535)) {
if ((httpPort < 1) || (httpPort > 65535)
|| (httpsPort < 1) || (httpsPort > 65535)) {
throw new IllegalArgumentException(
"one or both ports out of legal range: " + httpPort + ", "
+ httpsPort);
@@ -63,7 +63,7 @@ public class PortResolverImpl implements PortResolver {
if (portLookup != null) {
// IE 6 bug
serverPort = portLookup.intValue();
serverPort = portLookup;
}
return serverPort;
@@ -67,7 +67,7 @@ public abstract class AbstractRetryEntryPoint implements ChannelEntryPoint {
Integer redirectPort = getMappedPort(currentPort);
if (redirectPort != null) {
boolean includePort = redirectPort.intValue() != standardPort;
boolean includePort = redirectPort != standardPort;
redirectUrl = scheme + request.getServerName()
+ ((includePort) ? (":" + redirectPort) : "") + redirectUrl;
@@ -196,7 +196,7 @@ public class LoginUrlAuthenticationEntryPoint implements AuthenticationEntryPoin
if (httpsPort != null) {
// Overwrite scheme and port in the redirect URL
urlBuilder.setScheme("https");
urlBuilder.setPort(httpsPort.intValue());
urlBuilder.setPort(httpsPort);
}
else {
logger.warn("Unable to redirect to HTTPS as no port mapping found for HTTP port "
@@ -221,7 +221,7 @@ public class LoginUrlAuthenticationEntryPoint implements AuthenticationEntryPoin
RedirectUrlBuilder urlBuilder = new RedirectUrlBuilder();
urlBuilder.setScheme("https");
urlBuilder.setServerName(request.getServerName());
urlBuilder.setPort(httpsPort.intValue());
urlBuilder.setPort(httpsPort);
urlBuilder.setContextPath(request.getContextPath());
urlBuilder.setServletPath(request.getServletPath());
urlBuilder.setPathInfo(request.getPathInfo());
@@ -102,7 +102,7 @@ public class TokenBasedRememberMeServices extends AbstractRememberMeServices {
long tokenExpiryTime;
try {
tokenExpiryTime = new Long(cookieTokens[1]).longValue();
tokenExpiryTime = new Long(cookieTokens[1]);
}
catch (NumberFormatException nfe) {
throw new InvalidCookieException(
@@ -417,7 +417,7 @@ public class DigestAuthenticationFilter extends GenericFilterBean
// Extract expiry time from nonce
try {
this.nonceExpiryTime = new Long(nonceTokens[0]).longValue();
this.nonceExpiryTime = new Long(nonceTokens[0]);
}
catch (NumberFormatException nfe) {
throw new BadCredentialsException(DigestAuthenticationFilter.this.messages
@@ -183,7 +183,7 @@ public class FastHttpDateFormat {
}
if (cachedDate != null) {
return cachedDate.longValue();
return cachedDate;
}
Long date;
@@ -206,7 +206,7 @@ public class FastHttpDateFormat {
return (-1L);
}
else {
return date.longValue();
return date;
}
}
@@ -52,7 +52,7 @@ public class ELRequestMatcher implements RequestMatcher {
public boolean matches(HttpServletRequest request) {
EvaluationContext context = createELContext(request);
return expression.getValue(context, Boolean.class).booleanValue();
return expression.getValue(context, Boolean.class);
}
/**