1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 06:05:56 +02:00

[187732]check that attributes aren't null before using them

This commit is contained in:
David McKnight 2007-05-23 14:58:05 +00:00
parent 3703d9ab65
commit f5509c3959

View file

@ -325,15 +325,15 @@ public class DStoreHostFile implements IHostFile
protected static String getAttribute(String attributes, int index) protected static String getAttribute(String attributes, int index)
{ {
String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$ if (attributes != null)
if (str.length > index)
{ {
return str[index]; String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
} if (str.length > index)
else {
{ return str[index];
return null; }
} }
return null;
} }
public void renameTo(String newAbsolutePath) public void renameTo(String newAbsolutePath)