Remove superfluous comments
Use '^\s+//\ \~\ .*$' and '^\s+//\ ============+$' regular expression searches to remove superfluous comments. Prior to this commit, many classes would have comments to indicate blocks of code (such as constructors/methods/instance fields). These added a lot of noise and weren't all that helpful, especially given the outline views available in most modern IDEs. Issue gh-8945
This commit is contained in:
-9
@@ -36,19 +36,10 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
*/
|
||||
public class AuthenticationSimpleHttpInvokerRequestExecutor extends SimpleHttpInvokerRequestExecutor {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(AuthenticationSimpleHttpInvokerRequestExecutor.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private AuthenticationTrustResolver trustResolver = new AuthenticationTrustResolverImpl();
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Provided so subclasses can perform additional configuration if required (eg set
|
||||
* additional request headers for non-security related information etc).
|
||||
|
||||
-9
@@ -48,16 +48,10 @@ public class ContextPropagatingRemoteInvocation extends RemoteInvocation {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(ContextPropagatingRemoteInvocation.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final String principal;
|
||||
|
||||
private final String credentials;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs the object, storing the principal and credentials extracted from the
|
||||
* client-side security context.
|
||||
@@ -84,9 +78,6 @@ public class ContextPropagatingRemoteInvocation extends RemoteInvocation {
|
||||
}
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Invoked on the server-side.
|
||||
* <p>
|
||||
|
||||
-3
@@ -35,9 +35,6 @@ import org.springframework.remoting.support.RemoteInvocationFactory;
|
||||
*/
|
||||
public class ContextPropagatingRemoteInvocationFactory implements RemoteInvocationFactory {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
|
||||
return new ContextPropagatingRemoteInvocation(methodInvocation);
|
||||
}
|
||||
|
||||
-5
@@ -39,8 +39,6 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
*/
|
||||
public class AuthenticationSimpleHttpInvokerRequestExecutorTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
@@ -95,9 +93,6 @@ public class AuthenticationSimpleHttpInvokerRequestExecutorTests {
|
||||
assertThat(conn.getRequestProperty("Authorization")).isNull();
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
private class MockHttpURLConnection extends HttpURLConnection {
|
||||
|
||||
private Map<String, String> requestProperties = new HashMap<>();
|
||||
|
||||
-2
@@ -39,8 +39,6 @@ import org.springframework.test.util.ReflectionTestUtils;
|
||||
*/
|
||||
public class ContextPropagatingRemoteInvocationTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
|
||||
Reference in New Issue
Block a user