private static Collection<IOException> addException(
      @Nullable Collection<IOException> exceptions, IOException e) {
    if (exceptions == null) {
      exceptions = new ArrayList<>(); // don't need Set semantics
    }
    exceptions.add(e);
    return exceptions;
  }
private static Collection<IOException> addException(
      @Nullable Collection<IOException> exceptions, IOException e) {
    if (exceptions == null) {
      exceptions = new ArrayList<>(); 
    }
    exceptions.add(e);
    return exceptions;
  }
private static Collection < IOException > addException ( @ Nullable Collection < IOException > exceptions , IOException e ) { if ( exceptions == null ) { exceptions = new ArrayList <> ( ) ; // don't need Set semantics } exceptions . add ( e ) ; return exceptions ; }
Adds the given exception to the given collection, creating the collection if it's null. Returns
the collection.
Adds the given exception to the given collection creating the collection if it s null . Returns the collection .