I would not try to remove all bash-isms from openjdk. Instead I would find instances of /bin/sh that need to be changed to /bin/bash.
(Ubuntu's use of /bin/sh -> /bin/dash is technically correct, but caused much suffering https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463 )