1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Added a check for the project description and owner existence

This commit is contained in:
Mikhail Sennikovsky 2007-02-28 11:28:05 +00:00
parent 835dcd2dbc
commit 01ed38e9da

View file

@ -67,6 +67,9 @@ public class ProjectConverter implements ICProjectConverter {
public boolean canConvertProject(IProject project, String oldOwnerId, ICProjectDescription oldDes) { public boolean canConvertProject(IProject project, String oldOwnerId, ICProjectDescription oldDes) {
try { try {
if(oldOwnerId == null || oldDes == null)
return false;
IProjectDescription eDes = project.getDescription(); IProjectDescription eDes = project.getDescription();
Set natureSet = new HashSet(Arrays.asList(eDes.getNatureIds())); Set natureSet = new HashSet(Arrays.asList(eDes.getNatureIds()));
if(natureSet.contains(OLD_MAKE_NATURE_ID)) if(natureSet.contains(OLD_MAKE_NATURE_ID))