1
0
mirror of synced 2026-05-22 13:23:17 +00:00

Apply code cleanup rules to projects

Apply automated cleanup rules to add `@Override` and `@Deprecated`
annotations and to fix class references used with static methods.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-26 12:04:13 -07:00
committed by Rob Winch
parent 8866fa6fb0
commit 9e08b51ed3
558 changed files with 1418 additions and 102 deletions
@@ -61,6 +61,7 @@ public class JndiDnsResolver implements DnsResolver {
* org.springframework.security.remoting.dns.DnsResolver#resolveIpAddress(java.lang
* .String)
*/
@Override
public String resolveIpAddress(String hostname) {
return resolveIpAddress(hostname, this.ctxFactory.getCtx());
}
@@ -72,6 +73,7 @@ public class JndiDnsResolver implements DnsResolver {
* org.springframework.security.remoting.dns.DnsResolver#resolveServiceEntry(java.
* lang.String, java.lang.String)
*/
@Override
public String resolveServiceEntry(String serviceType, String domain) {
return resolveServiceEntry(serviceType, domain, this.ctxFactory.getCtx());
}
@@ -83,6 +85,7 @@ public class JndiDnsResolver implements DnsResolver {
* org.springframework.security.remoting.dns.DnsResolver#resolveServiceIpAddress(java
* .lang.String, java.lang.String)
*/
@Override
public String resolveServiceIpAddress(String serviceType, String domain) {
DirContext ctx = this.ctxFactory.getCtx();
String hostname = resolveServiceEntry(serviceType, domain, ctx);
@@ -165,6 +168,7 @@ public class JndiDnsResolver implements DnsResolver {
private static class DefaultInitialContextFactory implements InitialContextFactory {
@Override
public DirContext getCtx() {
Hashtable<String, String> env = new Hashtable<>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
@@ -66,6 +66,7 @@ public class AuthenticationSimpleHttpInvokerRequestExecutor extends SimpleHttpIn
* @param contentLength the length of the content to send
* @throws IOException if thrown by HttpURLConnection methods
*/
@Override
protected void prepareConnection(HttpURLConnection con, int contentLength) throws IOException {
super.prepareConnection(con, contentLength);
@@ -91,6 +91,7 @@ public class ContextPropagatingRemoteInvocation extends RemoteInvocation {
* @throws IllegalAccessException if the method could not be accessed
* @throws InvocationTargetException if the method invocation resulted in an exception
*/
@Override
public Object invoke(Object targetObject)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
@@ -35,6 +35,7 @@ import org.springframework.remoting.support.RemoteInvocationFactory;
*/
public class ContextPropagatingRemoteInvocationFactory implements RemoteInvocationFactory {
@Override
public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
return new ContextPropagatingRemoteInvocation(methodInvocation);
}
@@ -102,22 +102,27 @@ public class AuthenticationSimpleHttpInvokerRequestExecutorTests {
super(u);
}
@Override
public void connect() {
throw new UnsupportedOperationException("mock not implemented");
}
@Override
public void disconnect() {
throw new UnsupportedOperationException("mock not implemented");
}
@Override
public String getRequestProperty(String key) {
return this.requestProperties.get(key);
}
@Override
public void setRequestProperty(String key, String value) {
this.requestProperties.put(key, value);
}
@Override
public boolean usingProxy() {
throw new UnsupportedOperationException("mock not implemented");
}