Skip to content

Commit 0aec5ef

Browse files
committed
polishing
1 parent 5c3cf5f commit 0aec5ef

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2010 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -261,7 +261,7 @@ public SessionFactory getObject() {
261261
}
262262

263263
public Class<? extends SessionFactory> getObjectType() {
264-
return (this.sessionFactory != null) ? this.sessionFactory.getClass() : SessionFactory.class;
264+
return (this.sessionFactory != null ? this.sessionFactory.getClass() : SessionFactory.class);
265265
}
266266

267267
public boolean isSingleton() {

org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2010 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -82,8 +82,7 @@
8282
public abstract class AbstractTransactionalJUnit4SpringContextTests extends AbstractJUnit4SpringContextTests {
8383

8484
/**
85-
* The SimpleJdbcTemplate that this base class manages, available to
86-
* subclasses.
85+
* The SimpleJdbcTemplate that this base class manages, available to subclasses.
8786
*/
8887
protected SimpleJdbcTemplate simpleJdbcTemplate;
8988

@@ -99,9 +98,7 @@ public void setDataSource(DataSource dataSource) {
9998
}
10099

101100
/**
102-
* Specify the encoding for SQL scripts, if different from the platform
103-
* encoding.
104-
*
101+
* Specify the encoding for SQL scripts, if different from the platform encoding.
105102
* @see #executeSqlScript
106103
*/
107104
public void setSqlScriptEncoding(String sqlScriptEncoding) {
@@ -110,7 +107,6 @@ public void setSqlScriptEncoding(String sqlScriptEncoding) {
110107

111108
/**
112109
* Count the rows in the given table.
113-
*
114110
* @param tableName table name to count rows in
115111
* @return the number of rows in the table
116112
*/
@@ -121,7 +117,6 @@ protected int countRowsInTable(String tableName) {
121117
/**
122118
* Convenience method for deleting all rows from the specified tables. Use
123119
* with caution outside of a transaction!
124-
*
125120
* @param names the names of the tables from which to delete
126121
* @return the total number of rows deleted from all specified tables
127122
*/
@@ -131,19 +126,16 @@ protected int deleteFromTables(String... names) {
131126

132127
/**
133128
* Execute the given SQL script. Use with caution outside of a transaction!
134-
* <p>
135-
* The script will normally be loaded by classpath. There should be one
129+
* <p>The script will normally be loaded by classpath. There should be one
136130
* statement per line. Any semicolons will be removed. <b>Do not use this
137131
* method to execute DDL if you expect rollback.</b>
138-
*
139132
* @param sqlResourcePath the Spring resource path for the SQL script
140133
* @param continueOnError whether or not to continue without throwing an
141134
* exception in the event of an error
142135
* @throws DataAccessException if there is an error executing a statement
143136
* and continueOnError was <code>false</code>
144137
*/
145138
protected void executeSqlScript(String sqlResourcePath, boolean continueOnError) throws DataAccessException {
146-
147139
Resource resource = this.applicationContext.getResource(sqlResourcePath);
148140
SimpleJdbcTestUtils.executeSqlScript(this.simpleJdbcTemplate, new EncodedResource(resource,
149141
this.sqlScriptEncoding), continueOnError);

0 commit comments

Comments
 (0)