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
848127ae
Commit
848127ae
authored
Apr 23, 2020
by
dreis2211
Committed by
Stephane Nicoll
Apr 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid recompiling pattern in Handler#canonicalize
See gh-21103
parent
3f96e216
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Handler.java
...ain/java/org/springframework/boot/loader/jar/Handler.java
+3
-1
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java
View file @
848127ae
...
@@ -49,6 +49,8 @@ public class Handler extends URLStreamHandler {
...
@@ -49,6 +49,8 @@ public class Handler extends URLStreamHandler {
private
static
final
String
SEPARATOR
=
"!/"
;
private
static
final
String
SEPARATOR
=
"!/"
;
private
static
final
Pattern
SEPARATOR_PATTERN
=
Pattern
.
compile
(
SEPARATOR
,
Pattern
.
LITERAL
);
private
static
final
String
CURRENT_DIR
=
"/./"
;
private
static
final
String
CURRENT_DIR
=
"/./"
;
private
static
final
Pattern
CURRENT_DIR_PATTERN
=
Pattern
.
compile
(
CURRENT_DIR
,
Pattern
.
LITERAL
);
private
static
final
Pattern
CURRENT_DIR_PATTERN
=
Pattern
.
compile
(
CURRENT_DIR
,
Pattern
.
LITERAL
);
...
@@ -285,7 +287,7 @@ public class Handler extends URLStreamHandler {
...
@@ -285,7 +287,7 @@ public class Handler extends URLStreamHandler {
}
}
private
String
canonicalize
(
String
path
)
{
private
String
canonicalize
(
String
path
)
{
return
path
.
replace
(
SEPARATOR
,
"/"
);
return
SEPARATOR_PATTERN
.
matcher
(
path
).
replaceAll
(
"/"
);
}
}
public
JarFile
getRootJarFileFromUrl
(
URL
url
)
throws
IOException
{
public
JarFile
getRootJarFileFromUrl
(
URL
url
)
throws
IOException
{
...
...
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