extend NPE fix
This commit is contained in:
parent
3cda17468b
commit
fef1c68ff1
1 changed files with 6 additions and 6 deletions
|
@ -129,18 +129,18 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void preloadStreets(City o, ResultMatcher<Street> resultMatcher) {
|
public synchronized void preloadStreets(City o, ResultMatcher<Street> resultMatcher) {
|
||||||
|
//Looks like o can be null here, question is why
|
||||||
if (o!=null) {
|
if (o!=null) {
|
||||||
Collection<Street> streets = o.getStreets();
|
Collection<Street> streets = o.getStreets();
|
||||||
if(!streets.isEmpty()){
|
if(!streets.isEmpty()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
file.preloadStreets(o, BinaryMapIndexReader.buildAddressRequest(resultMatcher));
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("Disk operation failed" , e); //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
file.preloadStreets(o, BinaryMapIndexReader.buildAddressRequest(resultMatcher));
|
|
||||||
} catch (IOException e) {
|
|
||||||
log.error("Disk operation failed" , e); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// // not use ccontains It is really slow, takes about 10 times more than other steps
|
// // not use ccontains It is really slow, takes about 10 times more than other steps
|
||||||
|
|
Loading…
Reference in a new issue