IDEA inspection refactorings.
This commit is contained in:
@@ -20,7 +20,7 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
public class AddDeleteContactController {
|
||||
@Autowired
|
||||
private ContactManager contactManager;
|
||||
private Validator validator = new WebContactValidator();
|
||||
private final Validator validator = new WebContactValidator();
|
||||
|
||||
/**
|
||||
* Displays the "add contact" form.
|
||||
|
||||
@@ -45,8 +45,8 @@ public final class AdminPermissionController implements MessageSourceAware{
|
||||
@Autowired
|
||||
private ContactManager contactManager;
|
||||
private MessageSourceAccessor messages;
|
||||
private Validator addPermissionValidator = new AddPermissionValidator();
|
||||
private PermissionFactory permissionFactory = new DefaultPermissionFactory();
|
||||
private final Validator addPermissionValidator = new AddPermissionValidator();
|
||||
private final PermissionFactory permissionFactory = new DefaultPermissionFactory();
|
||||
|
||||
/**
|
||||
* Displays the permission admin page for a particular contact.
|
||||
@@ -83,7 +83,7 @@ public final class AdminPermissionController implements MessageSourceAware{
|
||||
|
||||
@InitBinder("addPermission")
|
||||
public void initBinder(WebDataBinder binder) {
|
||||
binder.setAllowedFields(new String[] {"recipient", "permission"});
|
||||
binder.setAllowedFields("recipient", "permission");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ClientApplication {
|
||||
|
||||
Method method = object.getClass().getMethod("setUsername", new Class[] {String.class});
|
||||
System.out.println("Found; Trying to setUsername(String) to " + authentication.getPrincipal());
|
||||
method.invoke(object, new Object[] {authentication.getPrincipal()});
|
||||
method.invoke(object, authentication.getPrincipal());
|
||||
} catch (NoSuchMethodException ignored) {
|
||||
System.out.println("This client proxy factory does not have a setUsername(String) method");
|
||||
} catch (IllegalAccessException ignored) {
|
||||
@@ -76,7 +76,7 @@ public class ClientApplication {
|
||||
System.out.println("Trying to find setPassword(String) method on: " + object.getClass().getName());
|
||||
|
||||
Method method = object.getClass().getMethod("setPassword", new Class[] {String.class});
|
||||
method.invoke(object, new Object[] {authentication.getCredentials()});
|
||||
method.invoke(object, authentication.getCredentials());
|
||||
System.out.println("Found; Trying to setPassword(String) to " + authentication.getCredentials());
|
||||
} catch (NoSuchMethodException ignored) {
|
||||
System.out.println("This client proxy factory does not have a setPassword(String) method");
|
||||
|
||||
@@ -134,9 +134,7 @@ public class ContactManagerBackend extends ApplicationObjectSupport implements C
|
||||
public List<String> getAllRecipients() {
|
||||
logger.debug("Returning all recipients");
|
||||
|
||||
List<String> list = contactDao.findAllPrincipals();
|
||||
|
||||
return list;
|
||||
return contactDao.findAllPrincipals();
|
||||
}
|
||||
|
||||
@Transactional(readOnly=true)
|
||||
|
||||
@@ -49,14 +49,14 @@ public class DataSourcePopulator implements InitializingBean {
|
||||
|
||||
JdbcTemplate template;
|
||||
private MutableAclService mutableAclService;
|
||||
Random rnd = new Random();
|
||||
final Random rnd = new Random();
|
||||
TransactionTemplate tt;
|
||||
String[] firstNames = {
|
||||
final String[] firstNames = {
|
||||
"Bob", "Mary", "James", "Jane", "Kristy", "Kirsty", "Kate", "Jeni", "Angela", "Melanie", "Kent", "William",
|
||||
"Geoff", "Jeff", "Adrian", "Amanda", "Lisa", "Elizabeth", "Prue", "Richard", "Darin", "Phillip", "Michael",
|
||||
"Belinda", "Samantha", "Brian", "Greg", "Matthew"
|
||||
};
|
||||
String[] lastNames = {
|
||||
final String[] lastNames = {
|
||||
"Smith", "Williams", "Jackson", "Rictor", "Nelson", "Fitzgerald", "McAlpine", "Sutherland", "Abbott", "Hall",
|
||||
"Edwards", "Gates", "Black", "Brown", "Gray", "Marwell", "Booch", "Johnson", "McTaggart", "Parklin",
|
||||
"Findlay", "Robinson", "Giugni", "Lang", "Chi", "Carmichael"
|
||||
|
||||
Reference in New Issue
Block a user