JBIDE-15383 - unify api for resolving default classpath so restore defau...

...lts works properly
c != null check is redundant with the instanceof check after