From 7c9215454a4c0028b65106b61ef2884a78a7e0be Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 7 Jun 2016 11:23:50 +0300 Subject: [PATCH] Address search: improve postcodes recognition --- OsmAnd-java/src/net/osmand/data/Postcode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/data/Postcode.java b/OsmAnd-java/src/net/osmand/data/Postcode.java index 45cfd5b3d6..edaac39b5c 100644 --- a/OsmAnd-java/src/net/osmand/data/Postcode.java +++ b/OsmAnd-java/src/net/osmand/data/Postcode.java @@ -203,8 +203,9 @@ public class Postcode { boolean result = false; if (isCountryKnown(country)) { Matcher matcher = getMatcher(s, country); - result = (matcher != null && matcher.find()) || s.matches("(.+\\d+.*|.*\\d+.+)"); + result = matcher != null && matcher.find(); } + result = result || s.matches("(.+\\d+.*|.*\\d+.+)"); return result; }