commons-lang icon indicating copy to clipboard operation
commons-lang copied to clipboard

LANG-1661 - Add methods to ClassUtils to get the class type names in a null-safe manner

Open arturobernalg opened this issue 3 years ago • 5 comments

Add methods ClassUtils to get the class names type in a null-safe manner:

  • getTypeName(Class)
  • getTypeName(Object)
  • getTypeName(Class, String)
  • getTypeName(Object, String)

arturobernalg avatar May 19 '21 06:05 arturobernalg

Coverage Status

Coverage increased (+0.001%) to 94.928% when pulling 825acec7f61c2ea690386728ce5304d623c5fc6c on arturobernalg:feature/LANG-1661 into c893f5d3ae90d5060db044ee3d0c79f36aea9511 on apache:master.

coveralls avatar May 19 '21 06:05 coveralls

Can this be used within Commons Lang? Also, would you rebase on master, please?

garydgregory avatar Mar 06 '22 13:03 garydgregory

Can this be used within Commons Lang? Why not. There are commons class utils operations. Also, would you rebase on master, please? Rebased.

arturobernalg avatar Mar 06 '22 15:03 arturobernalg

Codecov Report

Merging #762 (dc58eab) into master (65fb650) will increase coverage by 0.01%. The diff coverage is 75.00%.

@@             Coverage Diff              @@
##             master     #762      +/-   ##
============================================
+ Coverage     91.48%   91.50%   +0.01%     
- Complexity     7393     7403      +10     
============================================
  Files           188      188              
  Lines         15964    15973       +9     
  Branches       2999     2999              
============================================
+ Hits          14605    14616      +11     
+ Misses          765      764       -1     
+ Partials        594      593       -1     
Impacted Files Coverage Δ
...main/java/org/apache/commons/lang3/ClassUtils.java 90.52% <75.00%> (-0.18%) :arrow_down:
...pache/commons/lang3/function/FailableConsumer.java 71.42% <0.00%> (ø)
...pache/commons/lang3/function/FailableFunction.java 100.00% <0.00%> (ø)
...ache/commons/lang3/function/FailablePredicate.java 77.77% <0.00%> (ø)
...che/commons/lang3/function/FailableBiConsumer.java 71.42% <0.00%> (ø)
...che/commons/lang3/function/FailableBiFunction.java 100.00% <0.00%> (ø)
...he/commons/lang3/function/FailableBiPredicate.java 100.00% <0.00%> (ø)
...he/commons/lang3/function/FailableIntConsumer.java 71.42% <0.00%> (ø)
...he/commons/lang3/function/FailableIntFunction.java 0.00% <0.00%> (ø)
...e/commons/lang3/function/FailableIntPredicate.java 100.00% <0.00%> (ø)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 65fb650...dc58eab. Read the comment docs.

codecov-commenter avatar May 28 '22 16:05 codecov-commenter

Can this be used within Commons Lang? Also, would you rebase on master, please?

HI @garydgregory Maybe not in Commons Lang itself, but definitely its a utility that should be in ClassUtils be used by end users.

arturobernalg avatar May 28 '22 16:05 arturobernalg