From: Svjatoslav Agejenko Date: Tue, 24 Dec 2013 23:56:18 +0000 (+0200) Subject: default locale for root navigation item X-Git-Tag: svjatoslavcommons-1.8~116 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=a4f12f310bcce98e7ee70fe57249c141ffba0023;p=svjatoslav_commons.git default locale for root navigation item --- 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 c66e22a..4e58e44 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(final Locale... localeOrder) { - if (localeOrder.length == 0) - this.localeOrder = new Locale[] { Locale.ENG }; - else - this.localeOrder = localeOrder; + public NavigationItem() { + this(new Locale[] { Locale.ENG }); + } + public NavigationItem(final Locale... localeOrder) { + this.localeOrder = localeOrder; matchingWildcard = null; linkUrl = null; }