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
@@ -53,14 +53,8 @@ import org.springframework.security.web.context.support.SecurityWebApplicationCo
|
||||
*/
|
||||
public class AccessControlListTag extends TagSupport {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(AccessControlListTag.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
private Object domainObject;
|
||||
@@ -71,9 +65,6 @@ public class AccessControlListTag extends TagSupport {
|
||||
|
||||
private String var;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public int doStartTag() throws JspException {
|
||||
if ((null == hasPermission) || "".equals(hasPermission)) {
|
||||
return skipBody();
|
||||
|
||||
-6
@@ -43,9 +43,6 @@ import javax.servlet.jsp.tagext.TagSupport;
|
||||
*/
|
||||
public class AuthenticationTag extends TagSupport {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private String var;
|
||||
|
||||
private String property;
|
||||
@@ -56,9 +53,6 @@ public class AuthenticationTag extends TagSupport {
|
||||
|
||||
private boolean htmlEscape = true;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public AuthenticationTag() {
|
||||
init();
|
||||
}
|
||||
|
||||
-9
@@ -36,18 +36,12 @@ import org.springframework.security.core.userdetails.User;
|
||||
*/
|
||||
public class AuthenticationTagTests {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final MyAuthenticationTag authenticationTag = new MyAuthenticationTag();
|
||||
|
||||
private final Authentication auth = new TestingAuthenticationToken(
|
||||
new User("rodUserDetails", "koala", true, true, true, true, AuthorityUtils.NO_AUTHORITIES), "koala",
|
||||
AuthorityUtils.NO_AUTHORITIES);
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
@@ -144,9 +138,6 @@ public class AuthenticationTagTests {
|
||||
assertThat(authenticationTag.getLastMessage()).isEqualTo("<>& ");
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
private class MyAuthenticationTag extends AuthenticationTag {
|
||||
|
||||
String lastMessage = null;
|
||||
|
||||
-6
@@ -49,9 +49,6 @@ import org.springframework.web.context.support.StaticWebApplicationContext;
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class AuthorizeTagTests {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
@Mock
|
||||
private PermissionEvaluator permissionEvaluator;
|
||||
|
||||
@@ -62,9 +59,6 @@ public class AuthorizeTagTests {
|
||||
private final TestingAuthenticationToken currentUser = new TestingAuthenticationToken("abc", "123",
|
||||
"ROLE SUPERVISOR", "ROLE_TELLER");
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
SecurityContextHolder.getContext().setAuthentication(currentUser);
|
||||
|
||||
Reference in New Issue
Block a user