iamsanjay commented on PR #2634:
URL: https://github.com/apache/solr/pull/2634#issuecomment-2291197986

   I'll share my thought process on how I used forbidden APIs. Initially, I 
added entries to the config files while we were still using Java 11. Once we 
move to Java 21, there will be no need to include those in the forbiddenapis 
config file, as it will automatically detects them. So why did I add them now? 
To ensure that if someone uses these "deprecated" APIs, they receive a warning, 
and the plugin forces them to either handle it differently or apply annotations.
   
   Additionally, the Java compiler only fails the build if an API is marked for 
"removal," which is why I used two different annotations: one to suppress Java 
warnings and another for forbidden APIs. Some might question the need for both. 
I think it conveys the "risk factor." If an API is only deprecated, the 
forbidden annotation will do the job, but if it's marked for removal, another 
annotation is necessary.


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