From: Svjatoslav Agejenko Date: Tue, 14 Jan 2014 19:49:36 +0000 (+0200) Subject: fixed default locale selection for web navigation X-Git-Tag: svjatoslavcommons-1.8~109 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=6ddfea297cc4a1136503a454631f5bc5c72412b1;p=svjatoslav_commons.git fixed default locale selection for web navigation --- diff --git a/src/main/java/eu/svjatoslav/commons/network/navigation/NavigationItem.java b/src/main/java/eu/svjatoslav/commons/network/navigation/NavigationItem.java index a9ad856..6ab67e2 100755 --- a/src/main/java/eu/svjatoslav/commons/network/navigation/NavigationItem.java +++ b/src/main/java/eu/svjatoslav/commons/network/navigation/NavigationItem.java @@ -17,12 +17,12 @@ public class NavigationItem { private NavigationItem parent; private final String linkUrl; - public NavigationItem() { - this(Locale.ENG); - } - public NavigationItem(final Locale... localeOrder) { - this.localeOrder = localeOrder; + if (localeOrder.length == 0) + this.localeOrder = new Locale[] { Locale.ENG }; + else + this.localeOrder = localeOrder; + matchingPattern = null; linkUrl = null; }