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
e73f8c10
Commit
e73f8c10
authored
Jul 14, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17505 from dreis2211
* pr/17505: Polish Closes gh-17505
parents
b7e092e8
82047a25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
EndpointDiscovererTests.java
.../actuate/endpoint/annotation/EndpointDiscovererTests.java
+1
-1
DuplicateJsonObjectContextCustomizerFactory.java
...est/json/DuplicateJsonObjectContextCustomizerFactory.java
+3
-6
No files found.
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/EndpointDiscovererTests.java
View file @
e73f8c10
...
@@ -166,7 +166,7 @@ class EndpointDiscovererTests {
...
@@ -166,7 +166,7 @@ class EndpointDiscovererTests {
void
getEndpointsWhenTtlSetByIdAndIdDoesNotMatchShouldNotCacheInvokeCalls
()
{
void
getEndpointsWhenTtlSetByIdAndIdDoesNotMatchShouldNotCacheInvokeCalls
()
{
load
(
TestEndpointConfiguration
.
class
,
(
context
)
->
{
load
(
TestEndpointConfiguration
.
class
,
(
context
)
->
{
TestEndpointDiscoverer
discoverer
=
new
TestEndpointDiscoverer
(
context
,
TestEndpointDiscoverer
discoverer
=
new
TestEndpointDiscoverer
(
context
,
(
endpointId
)
->
(
endpointId
.
equals
(
"foo"
)
?
500L
:
0L
));
(
endpointId
)
->
(
endpointId
.
equals
(
EndpointId
.
of
(
"foo"
)
)
?
500L
:
0L
));
Map
<
EndpointId
,
TestExposableEndpoint
>
endpoints
=
mapEndpoints
(
discoverer
.
getEndpoints
());
Map
<
EndpointId
,
TestExposableEndpoint
>
endpoints
=
mapEndpoints
(
discoverer
.
getEndpoints
());
assertThat
(
endpoints
).
containsOnlyKeys
(
EndpointId
.
of
(
"test"
));
assertThat
(
endpoints
).
containsOnlyKeys
(
EndpointId
.
of
(
"test"
));
Map
<
Method
,
TestOperation
>
operations
=
mapOperations
(
endpoints
.
get
(
EndpointId
.
of
(
"test"
)));
Map
<
Method
,
TestOperation
>
operations
=
mapOperations
(
endpoints
.
get
(
EndpointId
.
of
(
"test"
)));
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java
View file @
e73f8c10
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
package
org
.
springframework
.
boot
.
test
.
json
;
package
org
.
springframework
.
boot
.
test
.
json
;
import
java.net.URL
;
import
java.net.URL
;
import
java.util.
ArrayList
;
import
java.util.
Collections
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.List
;
...
@@ -57,17 +57,14 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
...
@@ -57,17 +57,14 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
}
}
private
List
<
URL
>
findJsonObjects
()
{
private
List
<
URL
>
findJsonObjects
()
{
List
<
URL
>
jsonObjects
=
new
ArrayList
<>();
try
{
try
{
Enumeration
<
URL
>
resources
=
getClass
().
getClassLoader
().
getResources
(
"org/json/JSONObject.class"
);
Enumeration
<
URL
>
resources
=
getClass
().
getClassLoader
().
getResources
(
"org/json/JSONObject.class"
);
while
(
resources
.
hasMoreElements
())
{
return
Collections
.
list
(
resources
);
jsonObjects
.
add
(
resources
.
nextElement
());
}
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
// Continue
// Continue
}
}
return
jsonObjects
;
return
Collections
.
emptyList
()
;
}
}
private
void
logDuplicateJsonObjectsWarning
(
List
<
URL
>
jsonObjects
)
{
private
void
logDuplicateJsonObjectsWarning
(
List
<
URL
>
jsonObjects
)
{
...
...
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