src/main/java/com/hedera/hashgraph/identity/utils/InstantTypeAdapter.java
/**
   * Parses the given string into {@link Instant} object.
   *
   * @param instantStr Instant as string.
   * @return {@link Instant} object.
   * @throws IllegalArgumentException In case parsing fails.
   */
Parses the given string into  Instant object.
@param instantStr Instant as string.
@return  Instant object.
@throws IllegalArgumentException In case parsing fails.
Parses the given string into Instant object . @param instantStr Instant as string . @return Instant object . @throws IllegalArgumentException In case parsing fails .
protected Instant parse(final String instantStr) {
    if (instantStr == null) {
      return null;
    }
    TemporalAccessor accessor = null;
    try {
      accessor = firstParser.parse(instantStr);
    } catch (DateTimeParseException ignore) {
      for (DateTimeFormatter parser : otherParsers) {
        try {
          accessor = parser.parse(instantStr);
        } catch (DateTimeParseException ignoreToo) {
          continue;
        }
      }
    }
    if (accessor == null) {
      throw new IllegalArgumentException("Input string does not match any parsing formats used by this adapter");
    }
    return Instant.from(accessor);
  }
protected Instant parse ( final String instantStr ) { if ( instantStr == null ) { return null ; } TemporalAccessor accessor = null ; try { accessor = firstParser . parse ( instantStr ) ; } catch ( DateTimeParseException ignore ) { for ( DateTimeFormatter parser : otherParsers ) { try { accessor = parser . parse ( instantStr ) ; } catch ( DateTimeParseException ignoreToo ) { continue ; } } } if ( accessor == null ) { throw new IllegalArgumentException ( "Input string does not match any parsing formats used by this adapter" ) ; } return Instant . from ( accessor ) ; }
Parses the given string into {@link Instant} object.
Parses the given string into { @link Instant } object .
// ignore the error and move to the next parser