The Example PhysicalNamingStrategy implementation (https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#naming) is the first code example. Generally speaking it is good but there are quite some room for improvement, including:
PhysicalNamingStrategyStandardImpl could be used as the base class to extend as opposed to PhysicalNamingStrategy interface to implement;
the code could be simplified dramatically by existing commons util method;
there might be some code logic imperfection.
PR created at: