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
4cc598ac
Commit
4cc598ac
authored
Dec 18, 2017
by
Johnny Lim
Committed by
Stephane Nicoll
Dec 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace contains() with indexOf()
Closes gh-11373
parent
544c40d4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
AuditEvent.java
...va/org/springframework/boot/actuate/audit/AuditEvent.java
+2
-2
Link.java
...a/org/springframework/boot/actuate/endpoint/web/Link.java
+0
-1
ServerProperties.java
...ingframework/boot/autoconfigure/web/ServerProperties.java
+3
-2
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+2
-2
DocumentRoot.java
...springframework/boot/web/servlet/server/DocumentRoot.java
+3
-2
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/AuditEvent.java
View file @
4cc598ac
...
@@ -95,8 +95,8 @@ public class AuditEvent implements Serializable {
...
@@ -95,8 +95,8 @@ public class AuditEvent implements Serializable {
private
static
Map
<
String
,
Object
>
convert
(
String
[]
data
)
{
private
static
Map
<
String
,
Object
>
convert
(
String
[]
data
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
for
(
String
entry
:
data
)
{
for
(
String
entry
:
data
)
{
i
f
(
entry
.
contains
(
"="
))
{
i
nt
index
=
entry
.
indexOf
(
"="
);
int
index
=
entry
.
indexOf
(
"="
);
if
(
index
!=
-
1
)
{
result
.
put
(
entry
.
substring
(
0
,
index
),
entry
.
substring
(
index
+
1
));
result
.
put
(
entry
.
substring
(
0
,
index
),
entry
.
substring
(
index
+
1
));
}
}
else
{
else
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/Link.java
View file @
4cc598ac
...
@@ -39,7 +39,6 @@ public class Link {
...
@@ -39,7 +39,6 @@ public class Link {
public
Link
(
String
href
)
{
public
Link
(
String
href
)
{
this
.
href
=
href
;
this
.
href
=
href
;
this
.
templated
=
href
.
contains
(
"{"
);
this
.
templated
=
href
.
contains
(
"{"
);
}
}
/**
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
View file @
4cc598ac
...
@@ -303,8 +303,9 @@ public class ServerProperties {
...
@@ -303,8 +303,9 @@ public class ServerProperties {
public
String
getServletPrefix
()
{
public
String
getServletPrefix
()
{
String
result
=
this
.
path
;
String
result
=
this
.
path
;
if
(
result
.
contains
(
"*"
))
{
int
index
=
result
.
indexOf
(
"*"
);
result
=
result
.
substring
(
0
,
result
.
indexOf
(
"*"
));
if
(
index
!=
-
1
)
{
result
=
result
.
substring
(
0
,
index
);
}
}
if
(
result
.
endsWith
(
"/"
))
{
if
(
result
.
endsWith
(
"/"
))
{
result
=
result
.
substring
(
0
,
result
.
length
()
-
1
);
result
=
result
.
substring
(
0
,
result
.
length
()
-
1
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
4cc598ac
...
@@ -498,8 +498,8 @@ public class PropertiesLauncher extends Launcher {
...
@@ -498,8 +498,8 @@ public class PropertiesLauncher extends Launcher {
// If home dir is same as parent archive, no need to add it twice.
// If home dir is same as parent archive, no need to add it twice.
return
null
;
return
null
;
}
}
i
f
(
root
.
contains
(
"!"
))
{
i
nt
index
=
root
.
indexOf
(
"!"
);
int
index
=
root
.
indexOf
(
"!"
);
if
(
index
!=
-
1
)
{
File
file
=
new
File
(
this
.
home
,
root
.
substring
(
0
,
index
));
File
file
=
new
File
(
this
.
home
,
root
.
substring
(
0
,
index
));
if
(
root
.
startsWith
(
"jar:file:"
))
{
if
(
root
.
startsWith
(
"jar:file:"
))
{
file
=
new
File
(
root
.
substring
(
"jar:file:"
.
length
(),
index
));
file
=
new
File
(
root
.
substring
(
"jar:file:"
.
length
(),
index
));
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/DocumentRoot.java
View file @
4cc598ac
...
@@ -109,8 +109,9 @@ class DocumentRoot {
...
@@ -109,8 +109,9 @@ class DocumentRoot {
else
{
else
{
path
=
location
.
toURI
().
getPath
();
path
=
location
.
toURI
().
getPath
();
}
}
if
(
path
.
contains
(
"!/"
))
{
int
index
=
path
.
indexOf
(
"!/"
);
path
=
path
.
substring
(
0
,
path
.
indexOf
(
"!/"
));
if
(
index
!=
-
1
)
{
path
=
path
.
substring
(
0
,
index
);
}
}
return
new
File
(
path
);
return
new
File
(
path
);
}
}
...
...
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