Cleanup redundant type casts
This commit is contained in:
@@ -38,7 +38,7 @@ public class IndexPage {
|
||||
|
||||
public static <T> T to(WebDriver driver, int port, Class<T> page) {
|
||||
driver.get("http://localhost:" + port +"/");
|
||||
return (T) PageFactory.initElements(driver, page);
|
||||
return PageFactory.initElements(driver, page);
|
||||
}
|
||||
|
||||
public IndexPage assertAt() {
|
||||
|
||||
@@ -102,7 +102,7 @@ public class ContactDaoSpring extends JdbcDaoSupport implements ContactDao {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return (Contact) list.get(0);
|
||||
return list.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public class DocumentDaoImpl extends JdbcDaoSupport implements DocumentDao {
|
||||
.getLong("id")));
|
||||
}
|
||||
});
|
||||
return (AbstractElement[]) directories.toArray(new AbstractElement[] {});
|
||||
return directories.toArray(new AbstractElement[] {});
|
||||
}
|
||||
List<AbstractElement> directories = getJdbcTemplate().query(
|
||||
SELECT_FROM_DIRECTORY, new Object[] { directory.getId() },
|
||||
@@ -140,7 +140,7 @@ public class DocumentDaoImpl extends JdbcDaoSupport implements DocumentDao {
|
||||
});
|
||||
// Add the File elements after the Directory elements
|
||||
directories.addAll(files);
|
||||
return (AbstractElement[]) directories.toArray(new AbstractElement[] {});
|
||||
return directories.toArray(new AbstractElement[] {});
|
||||
}
|
||||
|
||||
public void update(File file) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SecureDocumentDaoImpl extends DocumentDaoImpl implements SecureDocu
|
||||
}
|
||||
|
||||
public String[] getUsers() {
|
||||
return (String[]) getJdbcTemplate().query(SELECT_FROM_USERS,
|
||||
return getJdbcTemplate().query(SELECT_FROM_USERS,
|
||||
new RowMapper<String>() {
|
||||
public String mapRow(ResultSet rs, int rowNumber) throws SQLException {
|
||||
return rs.getString("USERNAME");
|
||||
|
||||
Reference in New Issue
Block a user