jkesselm commented on PR #194:
URL: https://github.com/apache/xalan-java/pull/194#issuecomment-4068869983

   Hmm.
   
   This seems to be part of an effort to change some of the Java primitive 
classes, specifically Int, so they are compared strictly by value rather than 
object identity... removing the distinction between == and .equals().
   
   I am not at all sold on that being a good decision. Among other things, as 
the semaphore shows, sweeping object identity under the carpet this way does 
not remove it. And I am nervous about how this will ripple through subclassing. 
It feels like a breaking change in exchange for minimal gain.
   
   But apparently some systems are starting to issue deprecation warnings in 
preparation for it.
   
   
   Given the number of other warnings in our code, and given that the warning 
appears to be ignorable in this case since we are using the object only as a 
semaphore anchor and never comparing it either way, I am a trifle skeptical 
about the need to make a change. 
   
   On the other hand, if we are using an object only as a semaphore anchor, we 
honestly don't care what its type is. We prefer something lightweight, but 
since there won't be many instances even that is non-critical. 
   
   I'd like to spend a bit more time actually staring at the proposed change 
rather than theory, but I am currently inclined to classify it as "at worst, 
harmless." 
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to