Set<String> getTargetImageAdditionalTags() {
    String property = getProperty(PropertyNames.TO_TAGS);
    List<String> tags =
        property != null ? ConfigurationPropertyValidator.parseListProperty(property) : to.tags;
    if (tags.stream().anyMatch(Strings::isNullOrEmpty)) {
      String source = property != null ? PropertyNames.TO_TAGS : "<to><tags>";
      throw new IllegalArgumentException(source + " has empty tag");
    }
    return new HashSet<>(tags);
  }
@Test
  public void testEmptyOrNullTags() {
    // https://github.com/GoogleContainerTools/jib/issues/1534
    // Maven turns empty tags into null entries, and its possible to have empty tags in jib.to.tags
    sessionProperties.put("jib.to.tags", "a,,b");
    Exception ex =
        assertThrows(
            IllegalArgumentException.class,
            () -> testPluginConfiguration.getTargetImageAdditionalTags());
    assertThat(ex.getMessage()).isEqualTo("jib.to.tags has empty tag");
  }