Had a chat with Andrew Wang and here is the proposal:
– Retain the old abstract method logAuditEvent, the one with no CallerContext in the args
– Change the type of current method logAuditEvent (the one with CallerContext arg) to non-abstract and its default method body will be a simple call delegation to the older method (by dropping the CallerContext info). This will make the older AuditLogger class work without any changes and rebuild against new code
– So, any AuditLogger wanting to make use of CallerContext info, has to override the newer logAuditEvent method with custom implementation
– In DefaultAuditLogger, implement the abstract method logAuditEvent with no CallerContext arg with the method body simply delegating the call to the current version of logAuditEvent by passing null for the CallerContext
Tested the above with Class implementing HdfsAuditLogger the older way and Client operations are logged as expected without any method signature errors.