mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed an NPE.
This commit is contained in:
parent
72db9fbe93
commit
ffb7162210
1 changed files with 3 additions and 3 deletions
|
@ -677,20 +677,20 @@ public class PDOMFile implements IIndexFragmentFile {
|
||||||
return result.toArray(new IIndexName[result.size()]);
|
return result.toArray(new IIndexName[result.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PDOMFile[] findFiles(PDOMLinkage linkage, BTree btree, IIndexFileLocation location,
|
public static IIndexFragmentFile[] findFiles(PDOMLinkage linkage, BTree btree, IIndexFileLocation location,
|
||||||
IIndexLocationConverter strategy) throws CoreException {
|
IIndexLocationConverter strategy) throws CoreException {
|
||||||
String internalRepresentation= strategy.toInternalFormat(location);
|
String internalRepresentation= strategy.toInternalFormat(location);
|
||||||
if (internalRepresentation != null) {
|
if (internalRepresentation != null) {
|
||||||
Finder finder = new Finder(linkage.getDB(), internalRepresentation, linkage.getLinkageID(), null);
|
Finder finder = new Finder(linkage.getDB(), internalRepresentation, linkage.getLinkageID(), null);
|
||||||
btree.accept(finder);
|
btree.accept(finder);
|
||||||
long[] records= finder.getRecords();
|
long[] records= finder.getRecords();
|
||||||
PDOMFile[] result= new PDOMFile[records.length];
|
IIndexFragmentFile[] result= new IIndexFragmentFile[records.length];
|
||||||
for (int i = 0; i < result.length; i++) {
|
for (int i = 0; i < result.length; i++) {
|
||||||
result[i]= new PDOMFile(linkage, records[i]);
|
result[i]= new PDOMFile(linkage, records[i]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return null;
|
return IIndexFragmentFile.EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue