]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - base/runtime/org.argeo.util/src/main/java/org/argeo/util/LocaleCallback.java
Store data model CND files
[lgpl/argeo-commons.git] / base / runtime / org.argeo.util / src / main / java / org / argeo / util / LocaleCallback.java
index 2d3d9fc1a6d03a265f762ac5ae4100043b91a64b..60bf4c40f79a06696711b8b37f2e59ab5e0de761 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.argeo.util;
 
 import java.util.ArrayList;
@@ -71,6 +86,8 @@ public class LocaleCallback implements Callback {
        }
 
        public Locale getSelectedLocale() {
+               if (selectedIndex == null)
+                       return null;
                return availableLocales.get(selectedIndex);
        }