Revert "LPS-52047 Log javac and fail on deprecation (moved repeated code to a macrodef)"

This reverts commit d46b08e2c65a655b14e4226149b947e0a251f2b0.
LPS-52070 Add a protection remove