@Test(expected = UnsupportedOperationException.class) public void testCheckTransforms() { Map<String, String> transforms = new TreeMap<>(); transforms.put("uid", "xxx"); FilterUtil.checkTransforms(transforms); }
public static void checkTransforms(Map<String, String> transforms) { Set<String> possibleTransforms = new HashSet<>(Arrays.asList(LOWER_CASE, UPPER_CASE)); for (String transform : transforms.values()) { if (!possibleTransforms.contains(transform)) { throw new UnsupportedOperationException(String.format("invalid transform: %s", transform)); } } }
FilterUtil { public static void checkTransforms(Map<String, String> transforms) { Set<String> possibleTransforms = new HashSet<>(Arrays.asList(LOWER_CASE, UPPER_CASE)); for (String transform : transforms.values()) { if (!possibleTransforms.contains(transform)) { throw new UnsupportedOperationException(String.format("invalid transform: %s", transform)); } } } }
FilterUtil { public static void checkTransforms(Map<String, String> transforms) { Set<String> possibleTransforms = new HashSet<>(Arrays.asList(LOWER_CASE, UPPER_CASE)); for (String transform : transforms.values()) { if (!possibleTransforms.contains(transform)) { throw new UnsupportedOperationException(String.format("invalid transform: %s", transform)); } } } private  FilterUtil(); }
FilterUtil { public static void checkTransforms(Map<String, String> transforms) { Set<String> possibleTransforms = new HashSet<>(Arrays.asList(LOWER_CASE, UPPER_CASE)); for (String transform : transforms.values()) { if (!possibleTransforms.contains(transform)) { throw new UnsupportedOperationException(String.format("invalid transform: %s", transform)); } } } private  FilterUtil(); static void checkTransforms(Map<String, String> transforms); static String replace(String filter, String name, String value, Map<String, String> transforms); static String expandUserFilter(User user, String filter); static String expandUserFilter(User user, String filter, Map<String, String> transforms); }
FilterUtil { public static void checkTransforms(Map<String, String> transforms) { Set<String> possibleTransforms = new HashSet<>(Arrays.asList(LOWER_CASE, UPPER_CASE)); for (String transform : transforms.values()) { if (!possibleTransforms.contains(transform)) { throw new UnsupportedOperationException(String.format("invalid transform: %s", transform)); } } } private  FilterUtil(); static void checkTransforms(Map<String, String> transforms); static String replace(String filter, String name, String value, Map<String, String> transforms); static String expandUserFilter(User user, String filter); static String expandUserFilter(User user, String filter, Map<String, String> transforms);  }