Fixes CCE: JavaNature cannot be cast to IJavaProject (#1222)
Due to changes in
4869388c33
this cast will result in a ClassCastException
This commit is contained in:
@@ -41,7 +41,7 @@ public class JdtUtils {
|
||||
if (project.isAccessible()) {
|
||||
try {
|
||||
if (project.hasNature(JavaCore.NATURE_ID)) {
|
||||
return (IJavaProject) project.getNature(JavaCore.NATURE_ID);
|
||||
return JavaCore.create(project);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
LiveBeansUiPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, LiveBeansUiPlugin.PLUGIN_ID,
|
||||
|
||||
@@ -333,7 +333,7 @@ public class JdtUtils {
|
||||
if (project.isAccessible()) {
|
||||
try {
|
||||
if (project.hasNature(JavaCore.NATURE_ID)) {
|
||||
return (IJavaProject) project.getNature(JavaCore.NATURE_ID);
|
||||
return JavaCore.create(project);
|
||||
}
|
||||
}
|
||||
catch (CoreException e) {
|
||||
|
||||
Reference in New Issue
Block a user