Add inspection that will check if imported Java class has public access. This can lead to the hard to catch behaviour. — RubyMine feature request — Has it shipped?