Skip to content

Commit 6f7f032

Browse files
committed
Merge branch '6.1.x'
2 parents 7d4c8a4 + a0ae849 commit 6f7f032

File tree

7 files changed

+29
-24
lines changed

7 files changed

+29
-24
lines changed

spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -107,32 +107,32 @@ void notTransactional() {
107107
void defaultCommitOnAnnotatedClass() {
108108
Exception ex = new Exception();
109109
assertThatException()
110-
.isThrownBy(() -> testRollback(() -> annotationOnlyOnClassWithNoInterface.echo(ex), false))
111-
.isSameAs(ex);
110+
.isThrownBy(() -> testRollback(() -> annotationOnlyOnClassWithNoInterface.echo(ex), false))
111+
.isSameAs(ex);
112112
}
113113

114114
@Test
115115
void defaultRollbackOnAnnotatedClass() {
116116
RuntimeException ex = new RuntimeException();
117117
assertThatRuntimeException()
118-
.isThrownBy(() -> testRollback(() -> annotationOnlyOnClassWithNoInterface.echo(ex), true))
119-
.isSameAs(ex);
118+
.isThrownBy(() -> testRollback(() -> annotationOnlyOnClassWithNoInterface.echo(ex), true))
119+
.isSameAs(ex);
120120
}
121121

122122
@Test
123123
void defaultCommitOnSubclassOfAnnotatedClass() {
124124
Exception ex = new Exception();
125125
assertThatException()
126-
.isThrownBy(() -> testRollback(() -> new SubclassOfClassWithTransactionalAnnotation().echo(ex), false))
127-
.isSameAs(ex);
126+
.isThrownBy(() -> testRollback(() -> new SubclassOfClassWithTransactionalAnnotation().echo(ex), false))
127+
.isSameAs(ex);
128128
}
129129

130130
@Test
131131
void defaultCommitOnSubclassOfClassWithTransactionalMethodAnnotated() {
132132
Exception ex = new Exception();
133133
assertThatException()
134-
.isThrownBy(() -> testRollback(() -> new SubclassOfClassWithTransactionalMethodAnnotation().echo(ex), false))
135-
.isSameAs(ex);
134+
.isThrownBy(() -> testRollback(() -> new SubclassOfClassWithTransactionalMethodAnnotation().echo(ex), false))
135+
.isSameAs(ex);
136136
}
137137

138138
@Test
@@ -168,8 +168,8 @@ protected void testNotTransactional(TransactionOperationCallback toc, Throwable
168168
txManager.clear();
169169
assertThat(txManager.begun).isEqualTo(0);
170170
assertThatExceptionOfType(Throwable.class)
171-
.isThrownBy(toc::performTransactionalOperation)
172-
.isSameAs(expected);
171+
.isThrownBy(toc::performTransactionalOperation)
172+
.isSameAs(expected);
173173
assertThat(txManager.begun).isEqualTo(0);
174174
}
175175

spring-context/src/main/java/org/springframework/validation/AbstractErrors.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.

spring-tx/src/main/java/org/springframework/transaction/annotation/Ejb3TransactionAnnotationParser.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -28,11 +28,12 @@
2828
import org.springframework.transaction.interceptor.TransactionAttribute;
2929

3030
/**
31-
* Strategy implementation for parsing EJB3's {@link jakarta.ejb.TransactionAttribute}
32-
* annotation.
31+
* Strategy implementation for parsing EJB3's {@link jakarta.ejb.TransactionAttribute} annotation.
3332
*
3433
* @author Juergen Hoeller
3534
* @since 2.5
35+
* @see SpringTransactionAnnotationParser
36+
* @see JtaTransactionAnnotationParser
3637
*/
3738
@SuppressWarnings("serial")
3839
public class Ejb3TransactionAnnotationParser implements TransactionAnnotationParser, Serializable {

spring-tx/src/main/java/org/springframework/transaction/annotation/JtaTransactionAnnotationParser.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -35,6 +35,8 @@
3535
*
3636
* @author Juergen Hoeller
3737
* @since 4.0
38+
* @see SpringTransactionAnnotationParser
39+
* @see Ejb3TransactionAnnotationParser
3840
*/
3941
@SuppressWarnings("serial")
4042
public class JtaTransactionAnnotationParser implements TransactionAnnotationParser, Serializable {
@@ -65,7 +67,7 @@ protected TransactionAttribute parseTransactionAnnotation(AnnotationAttributes a
6567
RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute();
6668

6769
rbta.setPropagationBehaviorName(
68-
RuleBasedTransactionAttribute.PREFIX_PROPAGATION + attributes.getEnum("value").toString());
70+
RuleBasedTransactionAttribute.PREFIX_PROPAGATION + attributes.getEnum("value"));
6971

7072
List<RollbackRuleAttribute> rollbackRules = new ArrayList<>();
7173
for (Class<?> rbRule : attributes.getClassArray("rollbackOn")) {

spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -39,6 +39,8 @@
3939
* @author Juergen Hoeller
4040
* @author Mark Paluch
4141
* @since 2.5
42+
* @see JtaTransactionAnnotationParser
43+
* @see Ejb3TransactionAnnotationParser
4244
*/
4345
@SuppressWarnings("serial")
4446
public class SpringTransactionAnnotationParser implements TransactionAnnotationParser, Serializable {

spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public List<RollbackRuleAttribute> getRollbackRules() {
117117
/**
118118
* Winning rule is the shallowest rule (that is, the closest in the
119119
* inheritance hierarchy to the exception). If no rule applies (-1),
120-
* return false.
120+
* return {@code false}.
121121
* @see TransactionAttribute#rollbackOn(java.lang.Throwable)
122122
*/
123123
@Override

spring-tx/src/testFixtures/java/org/springframework/transaction/testfixture/TestTransactionExecutionListener.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,34 @@ public class TestTransactionExecutionListener implements TransactionExecutionLis
4949

5050

5151
@Override
52-
public void beforeBegin(TransactionExecution transactionState) {
52+
public void beforeBegin(TransactionExecution transaction) {
5353
this.beforeBeginCalled = true;
5454
}
5555

5656
@Override
57-
public void afterBegin(TransactionExecution transactionState, @Nullable Throwable beginFailure) {
57+
public void afterBegin(TransactionExecution transaction, @Nullable Throwable beginFailure) {
5858
this.afterBeginCalled = true;
5959
this.beginFailure = beginFailure;
6060
}
6161

6262
@Override
63-
public void beforeCommit(TransactionExecution transactionState) {
63+
public void beforeCommit(TransactionExecution transaction) {
6464
this.beforeCommitCalled = true;
6565
}
6666

6767
@Override
68-
public void afterCommit(TransactionExecution transactionState, @Nullable Throwable commitFailure) {
68+
public void afterCommit(TransactionExecution transaction, @Nullable Throwable commitFailure) {
6969
this.afterCommitCalled = true;
7070
this.commitFailure = commitFailure;
7171
}
7272

7373
@Override
74-
public void beforeRollback(TransactionExecution transactionState) {
74+
public void beforeRollback(TransactionExecution transaction) {
7575
this.beforeRollbackCalled = true;
7676
}
7777

7878
@Override
79-
public void afterRollback(TransactionExecution transactionState, @Nullable Throwable rollbackFailure) {
79+
public void afterRollback(TransactionExecution transaction, @Nullable Throwable rollbackFailure) {
8080
this.afterRollbackCalled = true;
8181
this.rollbackFailure = rollbackFailure;
8282
}

0 commit comments

Comments
 (0)