Skip to content

Commit

Permalink
Merge branch '3.3.x'
Browse files Browse the repository at this point in the history
Closes gh-42288
  • Loading branch information
philwebb committed Sep 13, 2024
2 parents dab5326 + ee2ec9b commit 36abc9c
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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 @@ -33,6 +33,7 @@
*
* @author Phillip Webb
* @author Madhura Bhave
* @author Yanming Zhou
*/
class DefaultBindConstructorProviderTests {

Expand Down Expand Up @@ -92,6 +93,12 @@ void getBindConstructorWhenHasTwoConstructorsWithBothConstructorBindingThrowsExc
.withMessageContaining("has more than one @ConstructorBinding");
}

@Test
void getBindConstructorWhenIsTypeWithPrivateConstructorReturnsNull() {
Constructor<?> constructor = this.provider.getBindConstructor(TypeWithPrivateConstructor.class, false);
assertThat(constructor).isNull();
}

@Test
void getBindConstructorWhenIsMemberTypeWithPrivateConstructorReturnsNull() {
Constructor<?> constructor = this.provider.getBindConstructor(MemberTypeWithPrivateConstructor.Member.class,
Expand Down Expand Up @@ -224,6 +231,13 @@ static class TwoConstructorsWithBothConstructorBinding {

}

static final class TypeWithPrivateConstructor {

private TypeWithPrivateConstructor(Environment environment) {
}

}

static class MemberTypeWithPrivateConstructor {

static final class Member {
Expand Down

0 comments on commit 36abc9c

Please sign in to comment.