16
16
17
17
package org .mitre .openid .connect .config ;
18
18
19
- import com .google .common .base .Splitter ;
20
- import com .google .gson .JsonElement ;
21
- import com .google .gson .JsonIOException ;
22
- import com .google .gson .JsonObject ;
23
- import com .google .gson .JsonParser ;
24
- import com .google .gson .JsonSyntaxException ;
25
- import org .slf4j .Logger ;
26
- import org .slf4j .LoggerFactory ;
27
- import org .springframework .beans .factory .annotation .Autowired ;
28
- import org .springframework .context .support .AbstractMessageSource ;
29
- import org .springframework .core .io .Resource ;
30
-
31
19
import java .io .File ;
32
20
import java .io .FileNotFoundException ;
33
21
import java .io .IOException ;
40
28
import java .util .Locale ;
41
29
import java .util .Map ;
42
30
31
+ import org .slf4j .Logger ;
32
+ import org .slf4j .LoggerFactory ;
33
+ import org .springframework .beans .factory .annotation .Autowired ;
34
+ import org .springframework .context .support .AbstractMessageSource ;
35
+ import org .springframework .core .io .Resource ;
36
+
37
+ import com .google .common .base .Splitter ;
38
+ import com .google .gson .JsonElement ;
39
+ import com .google .gson .JsonIOException ;
40
+ import com .google .gson .JsonObject ;
41
+ import com .google .gson .JsonParser ;
42
+ import com .google .gson .JsonSyntaxException ;
43
+
43
44
/**
44
45
* @author jricher
45
46
*/
@@ -85,6 +86,9 @@ protected MessageFormat resolveCode(String code, Locale locale) {
85
86
86
87
/**
87
88
* Get a value from the set of maps, taking the first match in order
89
+ * @param code
90
+ * @param langs
91
+ * @return
88
92
*/
89
93
private String getValue (String code , List <JsonObject > langs ) {
90
94
if (langs == null || langs .isEmpty ()) {
@@ -106,6 +110,9 @@ private String getValue(String code, List<JsonObject> langs) {
106
110
107
111
/**
108
112
* Get a value from a single map
113
+ * @param code
114
+ * @param lang
115
+ * @return
109
116
*/
110
117
private String getValue (String code , JsonObject lang ) {
111
118
@@ -144,7 +151,6 @@ private String getValue(String code, JsonObject lang) {
144
151
}
145
152
146
153
return value ;
147
-
148
154
}
149
155
150
156
/**
@@ -186,7 +192,6 @@ List<JsonObject> getLanguageMap(Locale locale) {
186
192
}
187
193
188
194
return languageMaps .get (locale );
189
-
190
195
}
191
196
192
197
/**
0 commit comments