We are migrating to use the new
cimg/openjdk-11.0 docker image. We found that AdoptOpenJDK does not contain the correct setup for fonts, which is needed for various Apache POI operations (and no doubt other use cases). This causes a NullPointerException in our tests.
We solved the problem by adding the following:
install_fonts: description: "Install missing JDK fonts" steps: - run: name: Installing JDK fonts command: | sudo apt-get -y -qq update || sudo apt-get -y -qq update sudo apt-get -y -qq install fontconfig
In our view, since AdoptOpenJDK is not going to be changed, the correct place to fix this is in the definition of the docker image. Can
cimg/openjdk be changed to always include the fonts, ie. the equivalent of the lines above.
Some threads (you’ll need to read most of all of these threads to understand it and to find test cases):