As reported in
Intellij IDEA trows NPE from build 47, it is regression of the fix for 6300062.
JOptionPane.getRootFrame() starts to return null which leads to NPE
JOptionPane.getRootFrame() should return shared owner frame as it used to.
We need to return the old functionality and partly roll back the fix for 6300062.
To support the new modality API we need to introduce new constructors for JDialog and JWindow which can true parent-less windows and dialogs