]> git.uio.no Git - ifi-stolz-refaktor.git/commitdiff
RefaktorHandleUtils: adding exists check in findType
authorErlend Kristiansen <erlenkr@ifi.uio.no>
Fri, 28 Feb 2014 08:26:00 +0000 (09:26 +0100)
committerErlend Kristiansen <erlenkr@ifi.uio.no>
Fri, 28 Feb 2014 08:26:00 +0000 (09:26 +0100)
software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/utils/RefaktorHandleUtils.java

index 0f5e2a85c48523371ab40c9f1d587bcd01f7b8bb..4d23b897af5d4c90a840ee418b73a61367d0a497 100644 (file)
@@ -62,7 +62,7 @@ public class RefaktorHandleUtils {
 
        private static IType findType(IJavaProject javaProject, String fullyQualifiedTypeName) throws JavaModelException {
                IType type = tryToFindAnonymousOrLocalType(javaProject, fullyQualifiedTypeName);
-               if (type == null)
+               if (type == null || !type.exists())
                        type = javaProject.findType(fullyQualifiedTypeName, new NullProgressMonitor());
                assert type != null;
                return type;