netty5/codec-smtp/src/main/java/io/netty/handler/codec/smtp
Michael O'Brien 12a5754569 Don't add null to SmtpResponse.details()
Motivation:

If the remote server returns an invalid response in the form "000 \r\n"
(i.e. a three digit code, then space, but no details), null is added
as a singletonList to the response being constructed.

This seems unexpected and it would be easier to handle an empty
details list in client code.

Modifications:

If detail is null (because frame.isReadable() returned false after
reading the separator), initialise DefaultSmtpResponse with an empty
list instead of a list containing a single null value.

Result:

When encountering this malformed server response, a DefaultSmtpResponse
with a code but no details will be created.
2017-05-23 19:17:59 +02:00
..
DefaultLastSmtpContent.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
DefaultSmtpContent.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
DefaultSmtpRequest.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DefaultSmtpResponse.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
LastSmtpContent.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
package-info.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
SmtpCommand.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
SmtpContent.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
SmtpRequest.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
SmtpRequestEncoder.java Reset the contentExpected flag when RSET is written 2017-05-19 19:36:04 +02:00
SmtpRequests.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
SmtpResponse.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
SmtpResponseDecoder.java Don't add null to SmtpResponse.details() 2017-05-23 19:17:59 +02:00
SmtpUtils.java Add smtp codec (client side only). 2016-04-07 18:42:17 +02:00