コード例 #1
0
 private Collection<String> getSet(Map<String, Object> props, String key, String defaultValue) {
   Set<String> toReturn = new HashSet<>();
   String joinedArray = get(props, key, "");
   if (Strings.isValid(joinedArray)) {
     String[] split = joinedArray.split(",");
     for (String value : split) {
       String toAdd = AuthorizationUtil.normalize(value);
       if (Strings.isValid(toAdd)) {
         toReturn.add(toAdd);
       }
     }
   } else {
     toReturn.add(defaultValue);
   }
   return toReturn;
 }
コード例 #2
0
 public void addScheme(String scheme) {
   if (Strings.isValid(scheme)) {
     schemes.add(AuthorizationUtil.normalize(scheme));
   }
 }