Commit Graph

451 Commits

Author SHA1 Message Date
Juergen Hoeller 78cad0fdd3 HibernateTransactionManager lazily acquires JDBC Connection
Aligned with HibernateJpaDialect, using ConnectionHandle as functional interface now. Also, LazyConnectionDataSourceProxy supports Connection holdability as applied by HibernateTransactionManager, for use with prepareConnection=true.

Issue: SPR-17216
2018-08-31 12:40:04 +02:00
JungHoon, Lee 1dac0df38b Prevent instantiation of NamedParameterBatchUpdateUtils
In order to prevent instantiation of utility classes, this commit
makes NamedParameterBatchUpdateUtils `abstract`.

Issue: SPR-17215
2018-08-27 15:35:00 +02:00
Juergen Hoeller 84300b796c Fix recent javadoc errors
Issue: SPR-17174
2018-08-16 18:51:31 +02:00
Sam Brannen bdac39150f Polish contribution
Issue: SPR-17120
2018-08-13 14:40:04 +02:00
Chris Harding 24ed6de6aa Add backslash escape support to containsSqlScriptDelimiters
Prior to this commit, ScriptUtils supported MySQL-style escapes ('\\')
when splitting a script into statements; however, MySQL-style escapes
were not supported when determining if a given script contained a
specified statement delimiter. This caused executeSqlScript() to
erroneously fallback to a newline as the statement separator in such
cases.

This commit fixes this issue by implementing the same check for
MySQL-style escapes in containsSqlScriptDelimiters() that was already
present in splitSqlScript().

Issue: SPR-17120
2018-08-13 14:40:04 +02:00
Juergen Hoeller 58e9706991 Polishing 2018-08-09 02:26:36 +02:00
Sam Brannen 7077af14f1 Use Float.valueOf(float) instead of deprecated Float(double) constructor 2018-08-08 17:19:15 +02:00
Kazuhiro Sera be211ceead Fix typos detected by github.com/client9/misspell 2018-08-08 12:50:46 +02:00
Juergen Hoeller b325c74216 Pruning of outdated JDK 6/7 references (plus related polishing) 2018-08-07 20:36:47 +02:00
Juergen Hoeller 4a147d26fc Initialize pre-filled HashMaps with large enough capacity
Empty Maps are preferably initialized without capacity (not initializing them at all or lazily initializing with default capacity when needed).

Issue: SPR-17105
2018-07-30 22:07:31 +02:00
stsypanov 457d586859 SPR-17074 pass argument of addAll/putAll into constructor 2018-07-30 21:27:55 +02:00
Johnny Lim 38525ceff6 Fix log level guard in DatabaseStartupValidator.afterPropertiesSet() 2018-07-26 15:45:42 +02:00
Johnny Lim 964467d269 Polish DatabaseStartupValidator.afterPropertiesSet() 2018-07-26 15:37:35 +02:00
Juergen Hoeller 9a43d2ec20 Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
Issue: SPR-16946
2018-07-20 15:05:16 +02:00
Juergen Hoeller 9c08a482d1 Prefer ArrayList/ArrayDeque over LinkedList for multi-element holders
LinkedList remains in place where a List is likely to remain empty or single-element (in order to avoid unused capacity).

Issue: SPR-17037
2018-07-18 22:17:42 +02:00
Juergen Hoeller a80c5121fe Polishing 2018-07-09 15:53:44 +02:00
Juergen Hoeller 63d6215247 Polishing 2018-07-04 19:23:27 +02:00
Juergen Hoeller 5dc8b5de6d Polishing 2018-07-04 15:07:17 +02:00
Juergen Hoeller 4ff1e3e74b Consistent abstract declaration for utility classes (plus polishing)
Issue: SPR-16968
2018-07-01 02:31:20 +02:00
Phillip Webb a89e716cc7 Use tabs rather than spaces in tests
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 1c25cec44f Polish test code
Polish a few issue identified when adding checkstyle to the
build. Although checkstyle is not enforcing rules on tests,
these are a few minor changes that are still worth making.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 81451aa800 Organize imports
Reorganize imports to ensure consistent ordering. This commit also
expands any `.*` static imports in favor of using fully-qualified
method references.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 5cedd0d5d4 Consistently use tabs rather than spaces
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 0b53c1096a Always use 'this.' when accessing fields
Ensure that `this.` is used consistently when accessing class
fields.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb eeebd51f57 Use consistent class design
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 866e9d702e Use consistent block style
Update all code to use a consistent block style.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb e0480f75ac Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Juergen Hoeller 7bce7504c7 JdbcTemplate consistently exposes first value of equally named columns
Issue: SPR-16578
2018-06-11 14:17:03 +02:00
Juergen Hoeller 25559b9e44 Polishing 2018-06-06 21:31:24 +02:00
Juergen Hoeller 0941081b0a Upgrade to HSQLDB 2.4.1, Derby 10.14.2.0, HtmlUnit 2.31, Selenium 3.12 2018-06-06 21:24:53 +02:00
Juergen Hoeller d9c63182d9 MapSqlParameterSource.addValue declares nullable value parameter
Issue: SPR-16843
2018-05-18 22:20:29 +02:00
nkjackzhang a1fa0daad5 Fix a typo in javadoc
Closes gh-1824
2018-05-10 17:32:21 +02:00
Johnny Lim fb898e1727 Remove inconsistent spaces 2018-05-05 11:07:35 +02:00
Johnny Lim 8f21cb1a7c Polish DatabaseStartupValidator 2018-05-05 11:07:20 +02:00
Juergen Hoeller e170cb0f79 Upgrade framework build to JPA 2.2 and JTA 1.3
Issue: SPR-16685
2018-04-11 16:06:10 +02:00
Juergen Hoeller ff53d78e96 Remove bogus DataSource test from JpaTransactionManagerTests 2018-04-10 00:40:51 +02:00
Juergen Hoeller 475c4d4425 Polishing 2018-04-03 12:24:00 +02:00
Juergen Hoeller 0bc01fcd55 Polishing 2018-03-30 13:42:23 +02:00
Johnny Lim 8dd0974e2f Rename SingleColumnRowMapperTest to align with the other tests 2018-03-30 12:28:16 +02:00
Juergen Hoeller 9a722b4558 Pass type name into PreparedStatement.setNull in case of Types.OTHER
Issue: SPR-16669
2018-03-29 23:43:53 +02:00
nkjackzhang 82cb5dbf2b NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly
In my opinion, we should parse ":{x}" style parameter as "x" is parameter using "NamedParameterUtils.parseSqlStatement",
so the condition "j - i > 2" is the correct condition, not "j - i > 3", because if "i" is the index of
":" in ":{x}", and "j" is the index of "}" in ":{x}",  "j - i == 3" is true.
Also add a test case for SPR-16663.
2018-03-29 15:00:25 +02:00
Juergen Hoeller b2d87abcbb Polishing 2018-03-28 12:06:38 +02:00
Juergen Hoeller e3d0ef6015 Use Map.forEach instead of manual Map.Entry iteration wherever possible
Issue: SPR-16646
2018-03-27 00:38:32 +02:00
Juergen Hoeller c441d60d1d Upgrade to Kotlin 1.2.31 and RxJava 2.1.12
Includes H2 1.4.197 and Selenium HtmlUnit Driver 2.29.3 as well.
2018-03-24 16:48:53 +01:00
Juergen Hoeller 702b27e1e4 Polishing 2018-03-19 12:05:04 +01:00
Juergen Hoeller 2c7efbb9d0 Deprecate TableMetaDataContext.getSimulationQueryForGetGeneratedKey 2018-03-19 12:04:51 +01:00
Juergen Hoeller b7c423813d CallMetaDataContext handles 'procedureColumnResult' as return parameter
Issue: SPR-16611
2018-03-19 12:04:15 +01:00
Juergen Hoeller 4fef1fe820 Polishing 2018-03-16 18:49:12 +01:00
igor-suhorukov 2f9d0a7de8 simplify boolean NOT operation 2018-03-08 23:44:15 +01:00
igor-suhorukov 32b689a994 use StringBuilder for complex string concatenation 2018-03-08 21:25:47 +01:00