vyommani opened a new pull request, #1237:
URL: https://github.com/apache/ranger/pull/1237

   …ured service-def classes
   
   ## What changes were proposed in this pull request?
   Several places resolve a configured class name via 
Class.forName(...).newInstance(), relying on the checkcast to catch a bad class 
— but the checkcast happens after construction, not before. Add an 
isAssignableFrom check before instantiation, in the existing try/catch, so an 
unassignable class is treated the same as an unresolvable one (falls back / 
skipped, as today).
   
   No new validation mechanism, no behavior change for valid configs. Tests 
added confirming a non-assignable class is never constructed while legitimate 
classes still work.
   
   
   ## How was this patch tested?
   
   all tests are green and add couple of new tests as well.


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

Reply via email to