Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
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
liyang
sts网站
Commits
2743785a
Commit
2743785a
authored
Dec 13, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复多参数逗号分隔的问题
parent
2a235917
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
JobInvokeUtil.java
...tz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
+12
-12
No files found.
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
View file @
2743785a
...
...
@@ -65,7 +65,7 @@ public class JobInvokeUtil
/**
* 校验是否为为class包名
*
* @param
str
名称
* @param
invokeTarget
名称
* @return true是 false否
*/
public
static
boolean
isValidClassName
(
String
invokeTarget
)
...
...
@@ -110,30 +110,30 @@ public class JobInvokeUtil
{
return
null
;
}
String
[]
methodParams
=
methodStr
.
split
(
",(?=(
?:[^\']*\"[^\']*\')*[^\
']*$)"
);
String
[]
methodParams
=
methodStr
.
split
(
",(?=(
[^\"']*[\"'][^\"']*[\"'])*[^\"
']*$)"
);
List
<
Object
[]>
classs
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
methodParams
.
length
;
i
++)
{
String
str
=
StringUtils
.
trimToEmpty
(
methodParams
[
i
]);
// String字符串类型,
包含'
if
(
StringUtils
.
contains
(
str
,
"'
"
))
// String字符串类型,
以'或"开头
if
(
StringUtils
.
startsWithAny
(
str
,
"'"
,
"\"
"
))
{
classs
.
add
(
new
Object
[]
{
StringUtils
.
replace
(
str
,
"'"
,
""
),
String
.
class
});
classs
.
add
(
new
Object
[]
{
StringUtils
.
substring
(
str
,
1
,
str
.
length
()
-
1
),
String
.
class
});
}
// boolean布尔类型,等于true或者false
else
if
(
StringUtils
.
equals
(
str
,
"true"
)
||
StringUtils
.
equalsIgnoreCase
(
str
,
"false"
))
else
if
(
"true"
.
equalsIgnoreCase
(
str
)
||
"false"
.
equalsIgnoreCase
(
str
))
{
classs
.
add
(
new
Object
[]
{
Boolean
.
valueOf
(
str
),
Boolean
.
class
});
}
// long长整形,
包含L
else
if
(
StringUtils
.
containsIgnoreCase
(
str
,
"L"
))
// long长整形,
以L结尾
else
if
(
StringUtils
.
endsWith
(
str
,
"L"
))
{
classs
.
add
(
new
Object
[]
{
Long
.
valueOf
(
StringUtils
.
replaceIgnoreCase
(
str
,
"L"
,
""
)),
Long
.
class
});
classs
.
add
(
new
Object
[]
{
Long
.
valueOf
(
StringUtils
.
substring
(
str
,
0
,
str
.
length
()
-
1
)),
Long
.
class
});
}
// double浮点类型,
包含D
else
if
(
StringUtils
.
containsIgnoreCase
(
str
,
"D"
))
// double浮点类型,
以D结尾
else
if
(
StringUtils
.
endsWith
(
str
,
"D"
))
{
classs
.
add
(
new
Object
[]
{
Double
.
valueOf
(
StringUtils
.
replaceIgnoreCase
(
str
,
"D"
,
""
)),
Double
.
class
});
classs
.
add
(
new
Object
[]
{
Double
.
valueOf
(
StringUtils
.
substring
(
str
,
0
,
str
.
length
()
-
1
)),
Double
.
class
});
}
// 其他类型归类为整形
else
...
...
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