fixed default locale selection for web navigation
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 14 Jan 2014 19:49:36 +0000 (21:49 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 14 Jan 2014 19:49:36 +0000 (21:49 +0200)
src/main/java/eu/svjatoslav/commons/network/navigation/NavigationItem.java

index a9ad856..6ab67e2 100755 (executable)
@@ -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;
        }