我正在浏览 salesforce.com 开发人员文档
在这部分代码中,为什么要执行 (referenceTos[0] != null) 检查?
// Determine whether this is a reference field
if (field.getType() == FieldType.reference)
{
// Determine whether this field refers to another object
String[] referenceTos = field.getReferenceTo();
if (referenceTos != null && referenceTos[0] != null)
{
System.out.println("\t\tField references the following objects:");
for (int k = 0; k < referenceTos.length; k++)
{
System.out.println("\t\t\t" + referenceTos[k]);
}
}
}