@Test public void returnsEmptyExclusionsWithoutConfig() throws Exception { CustomFieldsAdapter adapter = new CustomFieldsAdapter(); assertThat(adapter.getExcludedFieldKeyNames(), is(empty())); }
public List<String> getExcludedFieldKeyNames() { Collection<String> contextFieldsKeys = LogContext.getContextFieldsKeys(); List<String> result = new ArrayList<>(customFields.size()); for (CustomField customField : customFields) { if (!customField.isRetainOriginal() && !contextFieldsKeys.contains(customField.getKey())) { result.add(customField.getKey()); } } return result; }
CustomFieldsAdapter { public List<String> getExcludedFieldKeyNames() { Collection<String> contextFieldsKeys = LogContext.getContextFieldsKeys(); List<String> result = new ArrayList<>(customFields.size()); for (CustomField customField : customFields) { if (!customField.isRetainOriginal() && !contextFieldsKeys.contains(customField.getKey())) { result.add(customField.getKey()); } } return result; } }
CustomFieldsAdapter { public List<String> getExcludedFieldKeyNames() { Collection<String> contextFieldsKeys = LogContext.getContextFieldsKeys(); List<String> result = new ArrayList<>(customFields.size()); for (CustomField customField : customFields) { if (!customField.isRetainOriginal() && !contextFieldsKeys.contains(customField.getKey())) { result.add(customField.getKey()); } } return result; } CustomFieldsAdapter(CustomField... customFields); }
CustomFieldsAdapter { public List<String> getExcludedFieldKeyNames() { Collection<String> contextFieldsKeys = LogContext.getContextFieldsKeys(); List<String> result = new ArrayList<>(customFields.size()); for (CustomField customField : customFields) { if (!customField.isRetainOriginal() && !contextFieldsKeys.contains(customField.getKey())) { result.add(customField.getKey()); } } return result; } CustomFieldsAdapter(CustomField... customFields); List<String> getCustomFieldKeyNames(); List<String> getExcludedFieldKeyNames(); }
CustomFieldsAdapter { public List<String> getExcludedFieldKeyNames() { Collection<String> contextFieldsKeys = LogContext.getContextFieldsKeys(); List<String> result = new ArrayList<>(customFields.size()); for (CustomField customField : customFields) { if (!customField.isRetainOriginal() && !contextFieldsKeys.contains(customField.getKey())) { result.add(customField.getKey()); } } return result; } CustomFieldsAdapter(CustomField... customFields); List<String> getCustomFieldKeyNames(); List<String> getExcludedFieldKeyNames();  }