From f64bb3271e6a6fbfdaef06cbeb163d1fe990c648 Mon Sep 17 00:00:00 2001 From: Martin Lippert Date: Fri, 25 Jan 2013 14:55:00 +0100 Subject: [PATCH] IDE-1275: catch IllegalArgumentExceptions in order to avoid error dialogs in case of problematic situations for the Spring data code completion processor --- .../ide/eclipse/data/jdt/core/RepositoryInformation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/org.springframework.ide.eclipse.data.core/src/main/java/org/springframework/ide/eclipse/data/jdt/core/RepositoryInformation.java b/plugins/org.springframework.ide.eclipse.data.core/src/main/java/org/springframework/ide/eclipse/data/jdt/core/RepositoryInformation.java index a871e98870..04d6acc1bd 100644 --- a/plugins/org.springframework.ide.eclipse.data.core/src/main/java/org/springframework/ide/eclipse/data/jdt/core/RepositoryInformation.java +++ b/plugins/org.springframework.ide.eclipse.data.core/src/main/java/org/springframework/ide/eclipse/data/jdt/core/RepositoryInformation.java @@ -79,7 +79,6 @@ public static Module getModuleOf(IBean bean) { private final Class repositoryBaseInterface; public RepositoryInformation(IType type) { - try { this.type = type; @@ -118,9 +117,11 @@ public static RepositoryInformation create(IType type) { Assert.notNull(type); try { - return type.isInterface() ? new RepositoryInformation(type) : null; + return type.isInterface() && type.exists() ? new RepositoryInformation(type) : null; } catch (JavaModelException e) { return null; + } catch (IllegalArgumentException e) { + return null; } }