When import files is empty string,
line 484, no check for importFiles to be empty, this leads to a ScriptSourceInput pointing on a folder of which content will be listed in the generated DDL (on this machine ~ /Library/Java/Extensions/driver/)
NB
And if org.hibernate.cfg.AvailableSettings.HBM2DDL_IMPORT_FILES is not set to empty then import.sql is automatically added which is not intended in a DDL.
(setting it to null generates a NPE)
This is just demonstrating that the behavior of classLoaderService.locateResource( resourceName ) when resourceName is an empty string is platform-dependent, here obviously it is returning a folder URL and when a input stream is later opened on it, it returns the directory content.
Not calling that code when the resourceName string is empty at line 485 will fix the problem.
Nope. The code I pointed out is the master branch, meaning that the check if there. So, the issue was fixed and it’s unlikely that it will be backported to 5.3.
However, you can use 5.4 as it will be released soon.