diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java index 32d1a152be7c..135538e79531 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -261,7 +261,7 @@ public SessionFactory getObject() { } public Class getObjectType() { - return (this.sessionFactory != null) ? this.sessionFactory.getClass() : SessionFactory.class; + return (this.sessionFactory != null ? this.sessionFactory.getClass() : SessionFactory.class); } public boolean isSingleton() { diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java index 88d29411a2eb..11e773826488 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,8 +82,7 @@ public abstract class AbstractTransactionalJUnit4SpringContextTests extends AbstractJUnit4SpringContextTests { /** - * The SimpleJdbcTemplate that this base class manages, available to - * subclasses. + * The SimpleJdbcTemplate that this base class manages, available to subclasses. */ protected SimpleJdbcTemplate simpleJdbcTemplate; @@ -99,9 +98,7 @@ public void setDataSource(DataSource dataSource) { } /** - * Specify the encoding for SQL scripts, if different from the platform - * encoding. - * + * Specify the encoding for SQL scripts, if different from the platform encoding. * @see #executeSqlScript */ public void setSqlScriptEncoding(String sqlScriptEncoding) { @@ -110,7 +107,6 @@ public void setSqlScriptEncoding(String sqlScriptEncoding) { /** * Count the rows in the given table. - * * @param tableName table name to count rows in * @return the number of rows in the table */ @@ -121,7 +117,6 @@ protected int countRowsInTable(String tableName) { /** * Convenience method for deleting all rows from the specified tables. Use * with caution outside of a transaction! - * * @param names the names of the tables from which to delete * @return the total number of rows deleted from all specified tables */ @@ -131,11 +126,9 @@ protected int deleteFromTables(String... names) { /** * Execute the given SQL script. Use with caution outside of a transaction! - *

- * The script will normally be loaded by classpath. There should be one + *

The script will normally be loaded by classpath. There should be one * statement per line. Any semicolons will be removed. Do not use this * method to execute DDL if you expect rollback. - * * @param sqlResourcePath the Spring resource path for the SQL script * @param continueOnError whether or not to continue without throwing an * exception in the event of an error @@ -143,7 +136,6 @@ protected int deleteFromTables(String... names) { * and continueOnError was false */ protected void executeSqlScript(String sqlResourcePath, boolean continueOnError) throws DataAccessException { - Resource resource = this.applicationContext.getResource(sqlResourcePath); SimpleJdbcTestUtils.executeSqlScript(this.simpleJdbcTemplate, new EncodedResource(resource, this.sqlScriptEncoding), continueOnError);