Community
Participate
Working Groups
it throws a JavaModelException for ICompilationUnits outside the classpath the spec says that the exception is thrown when the element does not exist but it does exist - calling exists() confirms it it used to work - now a lot of code is broken
We warned you about this change, and we are still debating on the right behavior. See the question asked on jdt-core-dev. Jerome-please investigate asap. I thought we hadn't changed yet.
I don't understand how this could happen. The implementation of CompilationUnit.getUnderlyingResource() is to return getResource() which cannot throw a JavaModelException. Which version are using?
i was using a sneak preview version from Philippe
Fix for bug 25184 now ensures that exists() returns false for a cu outside the classpath. In this case getUnderlyingResource() will throw a JavaModelException as specified.