default locale for root navigation item
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 24 Dec 2013 23:56:18 +0000 (01:56 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 24 Dec 2013 23:56:18 +0000 (01:56 +0200)
src/main/java/eu/svjatoslav/commons/network/navigation/NavigationItem.java

index c66e22a..4e58e44 100755 (executable)
@@ -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;
        }