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
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue