Cleanup unnecessary unboxing
Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
This commit is contained in:
committed by
Josh Cummings
parent
2306d987e9
commit
2056834432
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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());
|
||||
|
||||
+1
-1
@@ -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(
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user