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
d3440880
Commit
d3440880
authored
Nov 16, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Avoid unnecessary pattern compilation in WebFluxTags"
See gh-24147
parent
b22bb7ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
WebFluxTags.java
...boot/actuate/metrics/web/reactive/server/WebFluxTags.java
+7
-7
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java
View file @
d3440880
...
@@ -131,13 +131,6 @@ public final class WebFluxTags {
...
@@ -131,13 +131,6 @@ public final class WebFluxTags {
return
URI_UNKNOWN
;
return
URI_UNKNOWN
;
}
}
private
static
String
removeTrailingSlash
(
String
text
)
{
if
(!
StringUtils
.
hasLength
(
text
))
{
return
text
;
}
return
text
.
endsWith
(
"/"
)
?
text
.
substring
(
0
,
text
.
length
()
-
1
)
:
text
;
}
private
static
String
getPathInfo
(
ServerWebExchange
exchange
)
{
private
static
String
getPathInfo
(
ServerWebExchange
exchange
)
{
String
path
=
exchange
.
getRequest
().
getPath
().
value
();
String
path
=
exchange
.
getRequest
().
getPath
().
value
();
String
uri
=
StringUtils
.
hasText
(
path
)
?
path
:
"/"
;
String
uri
=
StringUtils
.
hasText
(
path
)
?
path
:
"/"
;
...
@@ -145,6 +138,13 @@ public final class WebFluxTags {
...
@@ -145,6 +138,13 @@ public final class WebFluxTags {
return
removeTrailingSlash
(
singleSlashes
);
return
removeTrailingSlash
(
singleSlashes
);
}
}
private
static
String
removeTrailingSlash
(
String
text
)
{
if
(!
StringUtils
.
hasLength
(
text
))
{
return
text
;
}
return
text
.
endsWith
(
"/"
)
?
text
.
substring
(
0
,
text
.
length
()
-
1
)
:
text
;
}
/**
/**
* Creates an {@code exception} tag based on the {@link Class#getSimpleName() simple
* Creates an {@code exception} tag based on the {@link Class#getSimpleName() simple
* name} of the class of the given {@code exception}.
* name} of the class of the given {@code exception}.
...
...
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