Backport selected refinements from the nullability efforts

Issue: SPR-15656
This commit is contained in:
Juergen Hoeller
2017-09-27 00:09:58 +02:00
parent 18a3322d2f
commit 9fdc4404a5
194 changed files with 1236 additions and 1218 deletions

View File

@@ -408,7 +408,7 @@ public class LazyConnectionDataSourceProxy extends DelegatingDataSource {
// Apply kept transaction settings, if any.
if (this.readOnly) {
try {
this.target.setReadOnly(this.readOnly);
this.target.setReadOnly(true);
}
catch (Exception ex) {
// "read-only not supported" -> ignore, it's just a hint anyway

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
@@ -153,7 +153,7 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
* @see #addScript(Resource)
*/
public void setSqlScriptEncoding(String sqlScriptEncoding) {
this.sqlScriptEncoding = StringUtils.hasText(sqlScriptEncoding) ? sqlScriptEncoding : null;
this.sqlScriptEncoding = (StringUtils.hasText(sqlScriptEncoding) ? sqlScriptEncoding : null);
}
/**