Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
2b497b6a
Commit
2b497b6a
authored
Jan 06, 2021
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x' into 2.4.x
Closes gh-24670
parents
c014bb98
848ed65f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
OperationMethodParameterTests.java
...ndpoint/invoke/reflect/OperationMethodParameterTests.java
+11
-2
No files found.
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoke/reflect/OperationMethodParameterTests.java
View file @
2b497b6a
...
@@ -45,6 +45,9 @@ class OperationMethodParameterTests {
...
@@ -45,6 +45,9 @@ class OperationMethodParameterTests {
private
Method
exampleMetaJsr305
=
ReflectionUtils
.
findMethod
(
getClass
(),
"exampleMetaJsr305"
,
String
.
class
,
private
Method
exampleMetaJsr305
=
ReflectionUtils
.
findMethod
(
getClass
(),
"exampleMetaJsr305"
,
String
.
class
,
String
.
class
);
String
.
class
);
private
Method
exampleJsr305NonNull
=
ReflectionUtils
.
findMethod
(
getClass
(),
"exampleJsr305NonNull"
,
String
.
class
,
String
.
class
);
@Test
@Test
void
getNameShouldReturnName
()
{
void
getNameShouldReturnName
()
{
OperationMethodParameter
parameter
=
new
OperationMethodParameter
(
"name"
,
this
.
example
.
getParameters
()[
0
]);
OperationMethodParameter
parameter
=
new
OperationMethodParameter
(
"name"
,
this
.
example
.
getParameters
()[
0
]);
...
@@ -83,16 +86,22 @@ class OperationMethodParameterTests {
...
@@ -83,16 +86,22 @@ class OperationMethodParameterTests {
assertThat
(
parameter
.
isMandatory
()).
isFalse
();
assertThat
(
parameter
.
isMandatory
()).
isFalse
();
}
}
void
example
(
String
one
,
@Nullable
String
two
)
{
public
void
isMandatoryWhenJsrNonnullAnnotationShouldReturnTrue
()
{
OperationMethodParameter
parameter
=
new
OperationMethodParameter
(
"name"
,
this
.
exampleJsr305NonNull
.
getParameters
()[
1
]);
assertThat
(
parameter
.
isMandatory
()).
isTrue
();
}
void
example
(
String
one
,
@Nullable
String
two
)
{
}
}
void
exampleJsr305
(
String
one
,
@javax
.
annotation
.
Nullable
String
two
)
{
void
exampleJsr305
(
String
one
,
@javax
.
annotation
.
Nullable
String
two
)
{
}
}
void
exampleMetaJsr305
(
String
one
,
@MetaNullable
String
two
)
{
void
exampleMetaJsr305
(
String
one
,
@MetaNullable
String
two
)
{
}
void
exampleJsr305NonNull
(
String
one
,
@javax
.
annotation
.
Nonnull
String
two
)
{
}
}
@TypeQualifier
@TypeQualifier
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment