Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4739a24ac8
3 changed files with 3 additions and 3 deletions
|
@ -505,7 +505,7 @@ public class SearchUICore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean publish(SearchResult object) {
|
public boolean publish(SearchResult object) {
|
||||||
if (!phrase.getNameStringMatcher().matches(object.localeName)) {
|
if (phrase != null && !phrase.getNameStringMatcher().matches(object.localeName)) {
|
||||||
for (String s : object.otherNames) {
|
for (String s : object.otherNames) {
|
||||||
if (phrase.getNameStringMatcher().matches(s)) {
|
if (phrase.getNameStringMatcher().matches(s)) {
|
||||||
object.alternateName = s;
|
object.alternateName = s;
|
||||||
|
|
|
@ -289,7 +289,7 @@ public class SearchPhrase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectType[] getSearchTypes() {
|
public ObjectType[] getSearchTypes() {
|
||||||
return settings.getSearchTypes();
|
return settings == null ? null : settings.getSearchTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCustomSearch() {
|
public boolean isCustomSearch() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import org.junit.Test;
|
||||||
public class LocationSearchTest {
|
public class LocationSearchTest {
|
||||||
|
|
||||||
private void search(String string, LatLon latLon) throws IOException {
|
private void search(String string, LatLon latLon) throws IOException {
|
||||||
SearchResultMatcher srm = new SearchUICore.SearchResultMatcher(null, 0, null, 100);
|
SearchResultMatcher srm = new SearchUICore.SearchResultMatcher(null, null, 0, null, 100);
|
||||||
new SearchCoreFactory.SearchLocationAndUrlAPI().
|
new SearchCoreFactory.SearchLocationAndUrlAPI().
|
||||||
search(new SearchPhrase(null, OsmAndCollator.primaryCollator()).generateNewPhrase(string, null), srm);
|
search(new SearchPhrase(null, OsmAndCollator.primaryCollator()).generateNewPhrase(string, null), srm);
|
||||||
Assert.assertEquals(1, srm.getRequestResults().size());
|
Assert.assertEquals(1, srm.getRequestResults().size());
|
||||||
|
|
Loading…
Reference in a new issue