Skip to content

Optimize PropertyElf#2382

Open
guanchengang wants to merge 2 commits intobrettwooldridge:devfrom
guanchengang:opt
Open

Optimize PropertyElf#2382
guanchengang wants to merge 2 commits intobrettwooldridge:devfrom
guanchengang:opt

Conversation

@guanchengang
Copy link

1.support properties of boxing types
Java automatically performs boxing and unboxing for primitive types, so I believe we should adhere to this feature as well.

2.avoid unnecessary array checks and isAssignableFrom checks
Primitive types, along with their array types and String (which is modified by final), cannot have subclasses. Therefore, the original isArray and isAssignableFrom checks are meaningless, and we can use == directly (This makes the semantics clearer and can lead to some performance improvements).

3.avoid ambiguity when using writeMethod.invoke(Object obj, Object... args)

 *support properties of boxing types
 *avoid unnecessary array checks and isAssignableFrom checks
 *avoid ambiguity when using writeMethod.invoke(Object obj, Object... args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant