IN PROGRESS - BATCH-709: Change all collections to use generics

This commit is contained in:
robokaso
2008-07-16 10:26:22 +00:00
parent 4b04e4a7cf
commit 04a32007ad
6 changed files with 29 additions and 18 deletions

View File

@@ -1,5 +1,12 @@
#Thu Jan 03 08:57:40 GMT 2008
#Wed Jul 16 12:19:00 CEST 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.source=1.3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5

View File

@@ -17,7 +17,6 @@
package test.jdbc.datasource;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import javax.sql.DataSource;
@@ -99,6 +98,7 @@ public class InitializingDataSourceFactoryBean extends AbstractFactoryBean {
TransactionTemplate transactionTemplate = new TransactionTemplate(new DataSourceTransactionManager(dataSource));
transactionTemplate.execute(new TransactionCallback() {
@SuppressWarnings("unchecked")
public Object doInTransaction(TransactionStatus status) {
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
String[] scripts;
@@ -122,10 +122,9 @@ public class InitializingDataSourceFactoryBean extends AbstractFactoryBean {
}
private String stripComments(List list) {
private String stripComments(List<String> list) {
StringBuffer buffer = new StringBuffer();
for (Iterator iter = list.iterator(); iter.hasNext();) {
String line = (String) iter.next();
for (String line : list) {
if (!line.startsWith("//") && !line.startsWith("--")) {
buffer.append(line + "\n");
}
@@ -133,7 +132,7 @@ public class InitializingDataSourceFactoryBean extends AbstractFactoryBean {
return buffer.toString();
}
public Class getObjectType() {
public Class<DataSource> getObjectType() {
return DataSource.class;
}