Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mybatis-generator-plugin
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
mybatis-generator-plugin
Commits
eaa6be0e
Commit
eaa6be0e
authored
Apr 25, 2018
by
hewei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
可变参数判断升级
parent
ac78e1ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/test/java/com/itfsw/mybatis/generator/plugins/tools/ObjectUtil.java
...com/itfsw/mybatis/generator/plugins/tools/ObjectUtil.java
+1
-2
No files found.
src/test/java/com/itfsw/mybatis/generator/plugins/tools/ObjectUtil.java
View file @
eaa6be0e
...
@@ -18,7 +18,6 @@ package com.itfsw.mybatis.generator.plugins.tools;
...
@@ -18,7 +18,6 @@ package com.itfsw.mybatis.generator.plugins.tools;
import
com.sun.deploy.util.StringUtils
;
import
com.sun.deploy.util.StringUtils
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
...
@@ -134,7 +133,7 @@ public class ObjectUtil {
...
@@ -134,7 +133,7 @@ public class ObjectUtil {
Class
[]
parameterTypes
=
method
.
getParameterTypes
();
Class
[]
parameterTypes
=
method
.
getParameterTypes
();
// !! mapper动态代理后VarArgs检查有问题
// !! mapper动态代理后VarArgs检查有问题
// 暂时只检查前几位相同就假设为可变参数
// 暂时只检查前几位相同就假设为可变参数
int
check
=
args
.
length
>
0
?
(
args
[
args
.
length
-
1
]
instanceof
Array
?
args
.
length
-
1
:
args
.
length
)
:
0
;
int
check
=
parameterTypes
.
length
>
0
?
parameterTypes
.
length
-
(
parameterTypes
[
parameterTypes
.
length
-
1
].
getName
().
startsWith
(
"["
)
?
1
:
0
)
:
0
;
for
(
int
i
=
0
;
i
<
check
;
i
++)
{
for
(
int
i
=
0
;
i
<
check
;
i
++)
{
Class
parameterType
=
parameterTypes
[
i
];
Class
parameterType
=
parameterTypes
[
i
];
if
(!(
parameterType
.
isAssignableFrom
(
args
[
i
].
getClass
())))
{
if
(!(
parameterType
.
isAssignableFrom
(
args
[
i
].
getClass
())))
{
...
...
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