nithril / smtp-connection-pool

SMTP Connection Pool
Apache License 2.0
47 stars 19 forks source link

Feat invalidate transport #19

Closed nithril closed 5 years ago

nithril commented 5 years ago

From https://github.com/nithril/smtp-connection-pool/pull/18 This PR adds the possibility to invalidate ClosableSmtpConnection instead of returning them in the pool.

My use case is:

nithril commented 5 years ago

@evigeant, could you please check if the commit https://github.com/nithril/smtp-connection-pool/commit/750d6b77c071ce828125ff9bb807ad3dbb0fbf7c is ok for you?

evigeant commented 5 years ago

Yes, it all makes sense, cleaned up the code nicely. I did not know, you could have this kind of code:

void test() throws SpecificException {
  try {
    // Code that throws SpecificException
  } catch(Exception e) {
    throw e;
  }
}

With older versions of the JDK, it would complain about the throws clause I believe, but I learned today that it works well... Thanks.

nithril commented 5 years ago

Released in 1.4.0