Skip to content

Commit b75f818

Browse files
committed
Update to Spring Framework 6.1.0-M2
Closes gh-792
1 parent 20243cd commit b75f818

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

Diff for: core/src/main/java/org/springframework/ldap/support/LdapUtils.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,8 @@ private static final class CollectingAttributeValueCallbackHandler<T> implements
782782

783783
@Override
784784
public void handleAttributeValue(String attributeName, Object attributeValue, int index) {
785-
Assert.isTrue(attributeName == null || this.clazz.isAssignableFrom(attributeValue.getClass()));
785+
Assert.isTrue(attributeName == null || this.clazz.isAssignableFrom(attributeValue.getClass()),
786+
() -> "either attributeName must be null or the attribute value must be of type " + this.clazz);
786787
this.collection.add(this.clazz.cast(attributeValue));
787788
}
788789

Diff for: core/src/main/java/org/springframework/ldap/transaction/compensating/LdapTransactionUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private LdapTransactionUtils() {
5454
* name.
5555
*/
5656
public static Name getFirstArgumentAsName(Object[] args) {
57-
Assert.notEmpty(args);
57+
Assert.notEmpty(args, "args cannot be empty");
5858

5959
Object firstArg = args[0];
6060
return getArgumentAsName(firstArg);

Diff for: core/src/main/java/org/springframework/ldap/transaction/compensating/ModifyAttributesOperationRecorder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ModifyAttributesOperationRecorder(LdapOperations ldapOperations) {
5555
* CompensatingTransactionOperationRecorder#recordOperation(java.lang.Object[])
5656
*/
5757
public CompensatingTransactionOperationExecutor recordOperation(Object[] args) {
58-
Assert.notNull(args);
58+
Assert.notNull(args, "args cannot be empty");
5959
Name dn = LdapTransactionUtils.getFirstArgumentAsName(args);
6060
if (args.length != 2 || !(args[1] instanceof ModificationItem[])) {
6161
throw new IllegalArgumentException("Unexpected arguments to ModifyAttributes operation");

Diff for: core/src/main/java/org/springframework/ldap/transaction/compensating/RenameOperationRecorder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public RenameOperationRecorder(LdapOperations ldapOperations) {
5454
*/
5555
public CompensatingTransactionOperationExecutor recordOperation(Object[] args) {
5656
log.debug("Storing rollback information for rename operation");
57-
Assert.notEmpty(args);
57+
Assert.notEmpty(args, "args cannot be empty");
5858
if (args.length != 2) {
5959
// This really shouldn't happen.
6060
throw new IllegalArgumentException("Illegal argument length");

Diff for: dependencies/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
ext.queryDslVersion = '5.0.0'
1515

1616
dependencies {
17-
api platform("org.springframework:spring-framework-bom:6.0.10")
17+
api platform("org.springframework:spring-framework-bom:6.1.0-M2")
1818
api platform("org.springframework.data:spring-data-bom:2021.2.13")
1919
api platform('com.fasterxml.jackson:jackson-bom:2.15.2')
2020
api platform("org.junit:junit-bom:5.9.3")

Diff for: test-support/src/main/java/org/springframework/ldap/test/ContextSourceEc2InstanceLaunchingFactoryBean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public final Class getObjectType() {
4040

4141
@Override
4242
protected final Object doCreateInstance(final String dnsName) throws Exception {
43-
Assert.hasText(this.userDn);
43+
Assert.hasText(this.userDn, "userDn cannot be null");
4444
LdapContextSource instance = new LdapContextSource();
4545
instance.setUrl("ldap://" + dnsName);
4646
instance.setUserDn(this.userDn);

0 commit comments

Comments
 (0)