You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/04/01 05:07:48 UTC

[GitHub] [commons-jcs] arturobernalg opened a new pull request #53: JCS-216 - Redundant cast call

arturobernalg opened a new pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53


   Replace class.cast whit explicit Cast


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jcs] arturobernalg edited a comment on pull request #53: JCS-216 - Redundant cast call

Posted by GitBox <gi...@apache.org>.
arturobernalg edited a comment on pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53#issuecomment-811700073


   > @arturobernalg .class.cast is a function in java.lang.Class class, as any java method which is the reason it was preferred for this part of the code over instanceof/() casting which is a language feature directly translated to a bytecode instruction.
   
   Hi @rmannibucau 
   sound reasonable


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jcs] arturobernalg commented on pull request #53: JCS-216 - Redundant cast call

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53#issuecomment-811692434


   HI @arturobernalg 
   I don't  really understand about "enables to use a function". I think the use does't change.
   TY


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jcs] rmannibucau commented on pull request #53: JCS-216 - Redundant cast call

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53#issuecomment-811678970


   Hi,
   the rational to use .class.cast instead of (<type>) is it enables to use a function (so is consistent with other programming style) but also to debug it properly at need "directly" whereas with a standard cast it is hardcoder to do.
   So overall I think we should keep it if possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jcs] arturobernalg commented on pull request #53: JCS-216 - Redundant cast call

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53#issuecomment-811700073


   > @arturobernalg .class.cast is a function in java.lang.Class class, as any java method which is the reason it was preferred for this part of the code over instanceof/() casting which is a language feature directly translated to a bytecode instruction.
   
   Hi @rmannibucau 
   suena razonable 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jcs] rmannibucau commented on pull request #53: JCS-216 - Redundant cast call

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53#issuecomment-811695820


   @arturobernalg .class.cast is a function in java.lang.Class class, as any java method which is the reason it was preferred for this part of the code over instanceof/() casting which is a language feature directly translated to a bytecode instruction.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jcs] arturobernalg closed pull request #53: JCS-216 - Redundant cast call

Posted by GitBox <gi...@apache.org>.
arturobernalg closed pull request #53:
URL: https://github.com/apache/commons-jcs/pull/53


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org