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:
parent
3703d9ab65
commit
f5509c3959
1 changed files with 7 additions and 7 deletions
|
@ -324,16 +324,16 @@ public class DStoreHostFile implements IHostFile
|
|||
}
|
||||
|
||||
protected static String getAttribute(String attributes, int index)
|
||||
{
|
||||
if (attributes != null)
|
||||
{
|
||||
String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
|
||||
if (str.length > index)
|
||||
{
|
||||
return str[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void renameTo(String newAbsolutePath)
|
||||
|
|
Loading…
Add table
Reference in a new issue