- Timestamp:
- 02/04/19 13:44:13 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/auth/AuthenticationTag.java
r1202 r1230 26 26 } 27 27 28 public static Optional<Map<AuthenticationTag, String>> fetchUserData( final Collection<Text> from, finalAuthenticationTag... tags) {28 public static Optional<Map<AuthenticationTag, String>> fetchUserData(Collection<Text> from, boolean useDefaults, AuthenticationTag... tags) { 29 29 final Map<AuthenticationTag, String> fetchedData = new HashMap<AuthenticationTag, String>(); 30 30 31 for ( finalAuthenticationTag tag: tags) {32 for ( finalText canditate: from) {31 for (AuthenticationTag tag: tags) { 32 for (Text canditate: from) { 33 33 // use the canditate if it exists 34 34 if (canditate.hasData(tag.val)) { … … 37 37 } 38 38 // otherwise try use the default 39 finalString property = tag.def;39 String property = tag.def; 40 40 if (property != null && !property.isEmpty()) { 41 fetchedData.put(tag, property);41 fetchedData.put(tag, useDefaults ? property : null); 42 42 } 43 43 }
Note:
See TracChangeset
for help on using the changeset viewer.