Skip to content

Commit 5dc8b5d

Browse files
committed
Polishing
1 parent 094c9b8 commit 5dc8b5d

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

spring-core/src/main/java/org/springframework/core/DefaultParameterNameDiscoverer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -41,6 +41,7 @@ public class DefaultParameterNameDiscoverer extends PrioritizedParameterNameDisc
4141
private static final boolean kotlinPresent =
4242
ClassUtils.isPresent("kotlin.Unit", DefaultParameterNameDiscoverer.class.getClassLoader());
4343

44+
4445
public DefaultParameterNameDiscoverer() {
4546
if (kotlinPresent) {
4647
addDiscoverer(new KotlinReflectionParameterNameDiscoverer());

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
import org.springframework.util.Assert;
2626

2727
/**
28-
* Connection holder, wrapping a JDBC Connection.
28+
* Resource holder wrapping a JDBC {@link Connection}.
2929
* {@link DataSourceTransactionManager} binds instances of this class
30-
* to the thread, for a specific DataSource.
30+
* to the thread, for a specific {@link javax.sql.DataSource}.
3131
*
3232
* <p>Inherits rollback-only support for nested JDBC transactions
3333
* and reference count functionality from the base class.

spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
import org.springframework.util.ReflectionUtils;
3939

4040
/**
41-
* JMS resource holder, wrapping a JMS Connection and a JMS Session.
42-
* JmsTransactionManager binds instances of this class to the thread,
43-
* for a given JMS ConnectionFactory.
41+
* Resource holder wrapping a JMS {@link Connection} and a JMS {@link Session}.
42+
* {@link JmsTransactionManager} binds instances of this class to the thread,
43+
* for a given JMS {@link ConnectionFactory}.
4444
*
4545
* <p>Note: This is an SPI class, not intended to be used by applications.
4646
*

spring-jms/src/main/java/org/springframework/jms/listener/LocallyExposedJmsResourceHolder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -21,7 +21,7 @@
2121
import org.springframework.jms.connection.JmsResourceHolder;
2222

2323
/**
24-
* JmsResourceHolder marker subclass that indicates local exposure,
24+
* {@link JmsResourceHolder} marker subclass that indicates local exposure,
2525
* i.e. that does not indicate an externally managed transaction.
2626
*
2727
* @author Juergen Hoeller

spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTransactionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ protected final SessionFactory obtainSessionFactory() {
203203
* @see org.springframework.jdbc.core.JdbcTemplate
204204
*/
205205
public void setDataSource(@Nullable DataSource dataSource) {
206-
if (dataSource != null && dataSource instanceof TransactionAwareDataSourceProxy) {
206+
if (dataSource instanceof TransactionAwareDataSourceProxy) {
207207
// If we got a TransactionAwareDataSourceProxy, we need to perform transactions
208208
// for its underlying target DataSource, else data access code won't see
209209
// properly exposed transactions (i.e. transactions for the target DataSource).

spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public Map<String, Object> getJpaPropertyMap() {
255255
* @see org.springframework.jdbc.core.JdbcTemplate
256256
*/
257257
public void setDataSource(@Nullable DataSource dataSource) {
258-
if (dataSource != null && dataSource instanceof TransactionAwareDataSourceProxy) {
258+
if (dataSource instanceof TransactionAwareDataSourceProxy) {
259259
// If we got a TransactionAwareDataSourceProxy, we need to perform transactions
260260
// for its underlying target DataSource, else data access code won't see
261261
// properly exposed transactions (i.e. transactions for the target DataSource).

spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionHolder.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -21,10 +21,9 @@
2121
import org.springframework.transaction.support.ResourceHolderSupport;
2222

2323
/**
24-
* Connection holder, wrapping a CCI Connection.
25-
*
26-
* <p>CciLocalTransactionManager binds instances of this class
27-
* to the thread, for a given ConnectionFactory.
24+
* Resource holder wrapping a CCI {@link Connection}.
25+
* {@link CciLocalTransactionManager} binds instances of this class to the thread,
26+
* for a given {@link javax.resource.cci.ConnectionFactory}.
2827
*
2928
* <p>Note: This is an SPI class, not intended to be used by applications.
3029
*
@@ -38,10 +37,12 @@ public class ConnectionHolder extends ResourceHolderSupport {
3837

3938
private final Connection connection;
4039

40+
4141
public ConnectionHolder(Connection connection) {
4242
this.connection = connection;
4343
}
4444

45+
4546
public Connection getConnection() {
4647
return this.connection;
4748
}

0 commit comments

Comments
 (0)