@Test public void filterNull() { try { Filter.filter(null, null, null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, null, null, null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(PropFile.Prop.Empty, null, null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", null, null, null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, "", null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, Context.named(""), null, null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, null, Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, null, "", null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, null, null, Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(PropFile.Prop.Empty, "", null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", Context.named(""), null, null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(PropFile.Prop.Empty, null, Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", null, "", null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, "", Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", null, null, Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, Context.named(""), "", null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, Context.named(""), null, Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, null, "", Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", Context.named(""), "", null); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", Context.named(""), null, Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter("", null, "", Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } try { Filter.filter(null, Context.named(""), "", Collections.<Context, PropFileChain>emptyMap()); fail("Expecting a NullPointerException"); } catch (NullPointerException npe) { } }
public static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier, Map<Context, PropFileChain> filterConsultant) throws Circular { if ((unfiltered == null) || (uniqueIdentifier == null) || (filterConsultant == null)) { throw new NullPointerException(String.format("Parameters may not be null [ toFilter = %s " + "| uniqueIdentifier = %s | filterConsultant = %s ].", (unfiltered == null ? "null" : "prop"), uniqueIdentifier, (filterConsultant == null ? "null" : "map"))); } FilterResult filterResult = _filter(unfiltered.unfilteredValue, unfiltered.context(), uniqueIdentifier, filterConsultant); if (Output.isDebug() && filterResult.filtered) { String toFilter = unfiltered.value(); String truncatedToFilter = (toFilter.length() > 80) ? toFilter.substring(0, 80) + " [truncated]" : toFilter; String truncatedFiltered = (filterResult.filteredResult.length() > 80) ? filterResult.filteredResult.substring(0, 80) + " [truncated]" : filterResult.filteredResult; Output.print("^dbug^ filtered ^b^%s^r^ to ^b^%s^r^ [ in %s%s ].", truncatedToFilter, truncatedFiltered, unfiltered.context(), (Scope.Default.equals(unfiltered.scope()) ? "" : String.format(" with %s scope", unfiltered.scope().name))); } return unfiltered.with(filterResult.filteredResult, filterResult.filteredResultMarked); }
Filter { public static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier, Map<Context, PropFileChain> filterConsultant) throws Circular { if ((unfiltered == null) || (uniqueIdentifier == null) || (filterConsultant == null)) { throw new NullPointerException(String.format("Parameters may not be null [ toFilter = %s " + "| uniqueIdentifier = %s | filterConsultant = %s ].", (unfiltered == null ? "null" : "prop"), uniqueIdentifier, (filterConsultant == null ? "null" : "map"))); } FilterResult filterResult = _filter(unfiltered.unfilteredValue, unfiltered.context(), uniqueIdentifier, filterConsultant); if (Output.isDebug() && filterResult.filtered) { String toFilter = unfiltered.value(); String truncatedToFilter = (toFilter.length() > 80) ? toFilter.substring(0, 80) + " [truncated]" : toFilter; String truncatedFiltered = (filterResult.filteredResult.length() > 80) ? filterResult.filteredResult.substring(0, 80) + " [truncated]" : filterResult.filteredResult; Output.print("^dbug^ filtered ^b^%s^r^ to ^b^%s^r^ [ in %s%s ].", truncatedToFilter, truncatedFiltered, unfiltered.context(), (Scope.Default.equals(unfiltered.scope()) ? "" : String.format(" with %s scope", unfiltered.scope().name))); } return unfiltered.with(filterResult.filteredResult, filterResult.filteredResultMarked); } }
Filter { public static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier, Map<Context, PropFileChain> filterConsultant) throws Circular { if ((unfiltered == null) || (uniqueIdentifier == null) || (filterConsultant == null)) { throw new NullPointerException(String.format("Parameters may not be null [ toFilter = %s " + "| uniqueIdentifier = %s | filterConsultant = %s ].", (unfiltered == null ? "null" : "prop"), uniqueIdentifier, (filterConsultant == null ? "null" : "map"))); } FilterResult filterResult = _filter(unfiltered.unfilteredValue, unfiltered.context(), uniqueIdentifier, filterConsultant); if (Output.isDebug() && filterResult.filtered) { String toFilter = unfiltered.value(); String truncatedToFilter = (toFilter.length() > 80) ? toFilter.substring(0, 80) + " [truncated]" : toFilter; String truncatedFiltered = (filterResult.filteredResult.length() > 80) ? filterResult.filteredResult.substring(0, 80) + " [truncated]" : filterResult.filteredResult; Output.print("^dbug^ filtered ^b^%s^r^ to ^b^%s^r^ [ in %s%s ].", truncatedToFilter, truncatedFiltered, unfiltered.context(), (Scope.Default.equals(unfiltered.scope()) ? "" : String.format(" with %s scope", unfiltered.scope().name))); } return unfiltered.with(filterResult.filteredResult, filterResult.filteredResultMarked); } private  Filter(); }
Filter { public static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier, Map<Context, PropFileChain> filterConsultant) throws Circular { if ((unfiltered == null) || (uniqueIdentifier == null) || (filterConsultant == null)) { throw new NullPointerException(String.format("Parameters may not be null [ toFilter = %s " + "| uniqueIdentifier = %s | filterConsultant = %s ].", (unfiltered == null ? "null" : "prop"), uniqueIdentifier, (filterConsultant == null ? "null" : "map"))); } FilterResult filterResult = _filter(unfiltered.unfilteredValue, unfiltered.context(), uniqueIdentifier, filterConsultant); if (Output.isDebug() && filterResult.filtered) { String toFilter = unfiltered.value(); String truncatedToFilter = (toFilter.length() > 80) ? toFilter.substring(0, 80) + " [truncated]" : toFilter; String truncatedFiltered = (filterResult.filteredResult.length() > 80) ? filterResult.filteredResult.substring(0, 80) + " [truncated]" : filterResult.filteredResult; Output.print("^dbug^ filtered ^b^%s^r^ to ^b^%s^r^ [ in %s%s ].", truncatedToFilter, truncatedFiltered, unfiltered.context(), (Scope.Default.equals(unfiltered.scope()) ? "" : String.format(" with %s scope", unfiltered.scope().name))); } return unfiltered.with(filterResult.filteredResult, filterResult.filteredResultMarked); } private  Filter(); static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier,
                                       Map<Context, PropFileChain> filterConsultant); static String filter(String toFilter, Context context, String uniqueIdentifier,
                                Map<Context, PropFileChain> filterConsultant); }
Filter { public static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier, Map<Context, PropFileChain> filterConsultant) throws Circular { if ((unfiltered == null) || (uniqueIdentifier == null) || (filterConsultant == null)) { throw new NullPointerException(String.format("Parameters may not be null [ toFilter = %s " + "| uniqueIdentifier = %s | filterConsultant = %s ].", (unfiltered == null ? "null" : "prop"), uniqueIdentifier, (filterConsultant == null ? "null" : "map"))); } FilterResult filterResult = _filter(unfiltered.unfilteredValue, unfiltered.context(), uniqueIdentifier, filterConsultant); if (Output.isDebug() && filterResult.filtered) { String toFilter = unfiltered.value(); String truncatedToFilter = (toFilter.length() > 80) ? toFilter.substring(0, 80) + " [truncated]" : toFilter; String truncatedFiltered = (filterResult.filteredResult.length() > 80) ? filterResult.filteredResult.substring(0, 80) + " [truncated]" : filterResult.filteredResult; Output.print("^dbug^ filtered ^b^%s^r^ to ^b^%s^r^ [ in %s%s ].", truncatedToFilter, truncatedFiltered, unfiltered.context(), (Scope.Default.equals(unfiltered.scope()) ? "" : String.format(" with %s scope", unfiltered.scope().name))); } return unfiltered.with(filterResult.filteredResult, filterResult.filteredResultMarked); } private  Filter(); static PropFile.Prop filter(PropFile.Prop unfiltered, String uniqueIdentifier,
                                       Map<Context, PropFileChain> filterConsultant); static String filter(String toFilter, Context context, String uniqueIdentifier,
                                Map<Context, PropFileChain> filterConsultant); static final String DECORATOR; static final String DECORATOR_SCOPED; static final String DECORATOR_END; }