@Test public void extractOnePattern() { final List<Pattern> patterns = unit.extractPatterns(".*"); assertThat(patterns.get(0).pattern(), is(".*")); }
List<Pattern> extractPatterns(final String propertyValue) { if (propertyValue == null) return Collections.emptyList(); final List<Pattern> trimmedPatterns = new ArrayList<>(); final StringTokenizer tokenizer = new StringTokenizer(propertyValue, ","); while (tokenizer.hasMoreTokens()) { final String trimmedString = tokenizer.nextToken().trim(); if (!trimmedString.isEmpty()) { try { trimmedPatterns.add(Pattern.compile(trimmedString)); } catch (PatternSyntaxException e) { logger.error("Can not compile pattern '" + trimmedString + "'. Message: " + e.getMessage() + " -- Ignore pattern"); logger.debug("Detailed Exception cause: " + e.getMessage(), e); } } } return trimmedPatterns; }
PropertiesBasedTraceeFilterConfiguration implements TraceeFilterConfiguration { List<Pattern> extractPatterns(final String propertyValue) { if (propertyValue == null) return Collections.emptyList(); final List<Pattern> trimmedPatterns = new ArrayList<>(); final StringTokenizer tokenizer = new StringTokenizer(propertyValue, ","); while (tokenizer.hasMoreTokens()) { final String trimmedString = tokenizer.nextToken().trim(); if (!trimmedString.isEmpty()) { try { trimmedPatterns.add(Pattern.compile(trimmedString)); } catch (PatternSyntaxException e) { logger.error("Can not compile pattern '" + trimmedString + "'. Message: " + e.getMessage() + " -- Ignore pattern"); logger.debug("Detailed Exception cause: " + e.getMessage(), e); } } } return trimmedPatterns; } }
PropertiesBasedTraceeFilterConfiguration implements TraceeFilterConfiguration { List<Pattern> extractPatterns(final String propertyValue) { if (propertyValue == null) return Collections.emptyList(); final List<Pattern> trimmedPatterns = new ArrayList<>(); final StringTokenizer tokenizer = new StringTokenizer(propertyValue, ","); while (tokenizer.hasMoreTokens()) { final String trimmedString = tokenizer.nextToken().trim(); if (!trimmedString.isEmpty()) { try { trimmedPatterns.add(Pattern.compile(trimmedString)); } catch (PatternSyntaxException e) { logger.error("Can not compile pattern '" + trimmedString + "'. Message: " + e.getMessage() + " -- Ignore pattern"); logger.debug("Detailed Exception cause: " + e.getMessage(), e); } } } return trimmedPatterns; } PropertiesBasedTraceeFilterConfiguration(PropertyChain propertyChain);  PropertiesBasedTraceeFilterConfiguration(PropertyChain propertyChain,
													String profileName); }
PropertiesBasedTraceeFilterConfiguration implements TraceeFilterConfiguration { List<Pattern> extractPatterns(final String propertyValue) { if (propertyValue == null) return Collections.emptyList(); final List<Pattern> trimmedPatterns = new ArrayList<>(); final StringTokenizer tokenizer = new StringTokenizer(propertyValue, ","); while (tokenizer.hasMoreTokens()) { final String trimmedString = tokenizer.nextToken().trim(); if (!trimmedString.isEmpty()) { try { trimmedPatterns.add(Pattern.compile(trimmedString)); } catch (PatternSyntaxException e) { logger.error("Can not compile pattern '" + trimmedString + "'. Message: " + e.getMessage() + " -- Ignore pattern"); logger.debug("Detailed Exception cause: " + e.getMessage(), e); } } } return trimmedPatterns; } PropertiesBasedTraceeFilterConfiguration(PropertyChain propertyChain);  PropertiesBasedTraceeFilterConfiguration(PropertyChain propertyChain,
													String profileName); static PropertyChain loadPropertyChain(); @Override boolean shouldProcessParam(String paramName, Channel channel); @Override boolean shouldProcessContext(final Channel channel); @Override boolean shouldGenerateInvocationId(); @Override int generatedInvocationIdLength(); @Override boolean shouldGenerateSessionId(); @Override int generatedSessionIdLength(); @Override Map<String, String> filterDeniedParams(final Map<String, String> unfiltered, final Channel channel); }
PropertiesBasedTraceeFilterConfiguration implements TraceeFilterConfiguration { List<Pattern> extractPatterns(final String propertyValue) { if (propertyValue == null) return Collections.emptyList(); final List<Pattern> trimmedPatterns = new ArrayList<>(); final StringTokenizer tokenizer = new StringTokenizer(propertyValue, ","); while (tokenizer.hasMoreTokens()) { final String trimmedString = tokenizer.nextToken().trim(); if (!trimmedString.isEmpty()) { try { trimmedPatterns.add(Pattern.compile(trimmedString)); } catch (PatternSyntaxException e) { logger.error("Can not compile pattern '" + trimmedString + "'. Message: " + e.getMessage() + " -- Ignore pattern"); logger.debug("Detailed Exception cause: " + e.getMessage(), e); } } } return trimmedPatterns; } PropertiesBasedTraceeFilterConfiguration(PropertyChain propertyChain);  PropertiesBasedTraceeFilterConfiguration(PropertyChain propertyChain,
													String profileName); static PropertyChain loadPropertyChain(); @Override boolean shouldProcessParam(String paramName, Channel channel); @Override boolean shouldProcessContext(final Channel channel); @Override boolean shouldGenerateInvocationId(); @Override int generatedInvocationIdLength(); @Override boolean shouldGenerateSessionId(); @Override int generatedSessionIdLength(); @Override Map<String, String> filterDeniedParams(final Map<String, String> unfiltered, final Channel channel);  }