Skip to content

Remove unnecessary code#887

Closed
gluzandii wants to merge 2 commits intoapache:masterfrom
gluzandii:ns/update
Closed

Remove unnecessary code#887
gluzandii wants to merge 2 commits intoapache:masterfrom
gluzandii:ns/update

Conversation

@gluzandii
Copy link

Remove unnecessary boxing, unboxing and casts.

More:
ArrayUtil:
+ Removed unnecessary casts.
+ Removed unnecessary boxing, and unboxing.

ObjectUtils:
+ Line 952, identityToString, replaced StringBuilder for direct String concatenation.

MemberUtils:
+ Line 104, isAccessible, removed unnecessary null check, since isPublic does the null check.
More:
+ Remove unnecessary boxing in Mutable classes.
+ Remove unnecessary unboxing in MutableBoolean
@gluzandii gluzandii changed the title Small Changes Remove unnecessary code Apr 30, 2022
@garydgregory
Copy link
Member

Hi @o-x-e
-1: We want to see boxing and unboxing to make it obvious where NPEs may occur. We also want to show that there are method invocations taking place which should be considered when looking at the code from the performance angle.

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.

2 participants