@Test public void staticReferencesAreNotEligible() { List<Field> field = fieldsNamed("staticStringList"); assertTrue(stopAtFirstIneligibleField(field).isEmpty()); }
public static List<Field> stopAtFirstIneligibleField(List<Field> fields) { ArrayList<Field> eligibleFields = new ArrayList<Field>(); for (Field f : fields) { if (checkEligible(f)) { eligibleFields.add(f); } else { break; } } return eligibleFields.isEmpty() ? Collections.<Field>emptyList() : eligibleFields; }
DirectSerializationFilter { public static List<Field> stopAtFirstIneligibleField(List<Field> fields) { ArrayList<Field> eligibleFields = new ArrayList<Field>(); for (Field f : fields) { if (checkEligible(f)) { eligibleFields.add(f); } else { break; } } return eligibleFields.isEmpty() ? Collections.<Field>emptyList() : eligibleFields; } }
DirectSerializationFilter { public static List<Field> stopAtFirstIneligibleField(List<Field> fields) { ArrayList<Field> eligibleFields = new ArrayList<Field>(); for (Field f : fields) { if (checkEligible(f)) { eligibleFields.add(f); } else { break; } } return eligibleFields.isEmpty() ? Collections.<Field>emptyList() : eligibleFields; }  }
DirectSerializationFilter { public static List<Field> stopAtFirstIneligibleField(List<Field> fields) { ArrayList<Field> eligibleFields = new ArrayList<Field>(); for (Field f : fields) { if (checkEligible(f)) { eligibleFields.add(f); } else { break; } } return eligibleFields.isEmpty() ? Collections.<Field>emptyList() : eligibleFields; }  static List<Field> stopAtFirstIneligibleField(List<Field> fields); }
DirectSerializationFilter { public static List<Field> stopAtFirstIneligibleField(List<Field> fields) { ArrayList<Field> eligibleFields = new ArrayList<Field>(); for (Field f : fields) { if (checkEligible(f)) { eligibleFields.add(f); } else { break; } } return eligibleFields.isEmpty() ? Collections.<Field>emptyList() : eligibleFields; }  static List<Field> stopAtFirstIneligibleField(List<Field> fields);  }