@Test @SuppressWarnings("ResourceType") public void testLoadXmlMissingResource() { Map<String, NotificationActionButtonGroup> groups = ActionButtonGroupsParser.fromXml(context, -1); assertTrue(groups.isEmpty()); }
@NonNull public static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource) { XmlResourceParser parser; try { parser = context.getResources().getXml(resource); return parseGroups(context, parser); } catch (IOException | XmlPullParserException | Resources.NotFoundException | NullPointerException e) { Logger.error(e, "Failed to parse NotificationActionButtonGroups."); return new HashMap<>(); } }
ActionButtonGroupsParser { @NonNull public static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource) { XmlResourceParser parser; try { parser = context.getResources().getXml(resource); return parseGroups(context, parser); } catch (IOException | XmlPullParserException | Resources.NotFoundException | NullPointerException e) { Logger.error(e, "Failed to parse NotificationActionButtonGroups."); return new HashMap<>(); } } }
ActionButtonGroupsParser { @NonNull public static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource) { XmlResourceParser parser; try { parser = context.getResources().getXml(resource); return parseGroups(context, parser); } catch (IOException | XmlPullParserException | Resources.NotFoundException | NullPointerException e) { Logger.error(e, "Failed to parse NotificationActionButtonGroups."); return new HashMap<>(); } }  }
ActionButtonGroupsParser { @NonNull public static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource) { XmlResourceParser parser; try { parser = context.getResources().getXml(resource); return parseGroups(context, parser); } catch (IOException | XmlPullParserException | Resources.NotFoundException | NullPointerException e) { Logger.error(e, "Failed to parse NotificationActionButtonGroups."); return new HashMap<>(); } }  @NonNull static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource); }
ActionButtonGroupsParser { @NonNull public static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource) { XmlResourceParser parser; try { parser = context.getResources().getXml(resource); return parseGroups(context, parser); } catch (IOException | XmlPullParserException | Resources.NotFoundException | NullPointerException e) { Logger.error(e, "Failed to parse NotificationActionButtonGroups."); return new HashMap<>(); } }  @NonNull static Map<String, NotificationActionButtonGroup> fromXml(@NonNull Context context, @XmlRes int resource);  }