Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller authored and zx20110729 committed Feb 18, 2022
1 parent 47ab334 commit bb837f3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -97,7 +97,7 @@ public final class CachedIntrospectionResults {
SpringProperties.getFlag(IGNORE_BEANINFO_PROPERTY_NAME);

/** Stores the BeanInfoFactory instances. */
private static List<BeanInfoFactory> beanInfoFactories = SpringFactoriesLoader.loadFactories(
private static final List<BeanInfoFactory> beanInfoFactories = SpringFactoriesLoader.loadFactories(
BeanInfoFactory.class, CachedIntrospectionResults.class.getClassLoader());

private static final Log logger = LogFactory.getLog(CachedIntrospectionResults.class);
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -40,6 +40,11 @@ public boolean isRequired(DependencyDescriptor descriptor) {
return descriptor.isRequired();
}

@Override
public boolean hasQualifier(DependencyDescriptor descriptor) {
return false;
}

@Override
@Nullable
public Object getSuggestedValue(DependencyDescriptor descriptor) {
Expand Down
Expand Up @@ -137,7 +137,6 @@ public abstract class ClassUtils {
primitiveTypes.addAll(primitiveWrapperTypeMap.values());
Collections.addAll(primitiveTypes, boolean[].class, byte[].class, char[].class,
double[].class, float[].class, int[].class, long[].class, short[].class);
primitiveTypes.add(void.class);
for (Class<?> primitiveType : primitiveTypes) {
primitiveTypeNameMap.put(primitiveType.getName(), primitiveType);
}
Expand Down
Expand Up @@ -195,7 +195,7 @@ protected DataSource obtainDataSource() {
* through an explicit statement on the transactional connection:
* "SET TRANSACTION READ ONLY" as understood by Oracle, MySQL and Postgres.
* <p>The exact treatment, including any SQL statement executed on the connection,
* can be customized through through {@link #prepareTransactionalConnection}.
* can be customized through {@link #prepareTransactionalConnection}.
* <p>This mode of read-only handling goes beyond the {@link Connection#setReadOnly}
* hint that Spring applies by default. In contrast to that standard JDBC hint,
* "SET TRANSACTION READ ONLY" enforces an isolation-level-like connection mode
Expand Down Expand Up @@ -250,9 +250,6 @@ protected boolean isExistingTransaction(Object transaction) {
return (txObject.hasConnectionHolder() && txObject.getConnectionHolder().isTransactionActive());
}

/**
* This implementation sets the isolation level but ignores the timeout.
*/
@Override
protected void doBegin(Object transaction, TransactionDefinition definition) {
DataSourceTransactionObject txObject = (DataSourceTransactionObject) transaction;
Expand Down
Expand Up @@ -398,7 +398,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
EntityManager em = txObject.getEntityManagerHolder().getEntityManager();

// Delegate to JpaDialect for actual transaction begin.
final int timeoutToUse = determineTimeout(definition);
int timeoutToUse = determineTimeout(definition);
Object transactionData = getJpaDialect().beginTransaction(em,
new JpaTransactionDefinition(definition, timeoutToUse, txObject.isNewEntityManagerHolder()));
txObject.setTransactionData(transactionData);
Expand Down

0 comments on commit bb837f3

Please sign in to comment.