Author: norman
Date: Fri Sep 23 04:04:06 2011
New Revision: 1174512
URL: http://svn.apache.org/viewvc?rev=1174512&view=rev
Log:
Allow to only set the return code as this is valid in smtp
Modified:
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPResponse.java
Modified:
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPResponse.java
URL:
http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPResponse.java?rev=1174512&r1=1174511&r2=1174512&view=diff
==============================================================================
---
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPResponse.java
(original)
+++
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPResponse.java
Fri Sep 23 04:04:06 2011
@@ -38,8 +38,6 @@ public class SMTPResponse extends Abstra
*/
public SMTPResponse(String code, CharSequence description) {
super(code, description);
- if (code == null) throw new IllegalArgumentException("SMTPResponse
code can not be null");
- if (description == null) throw new
IllegalArgumentException("SMTPResponse description can not be null");
}
/**
@@ -55,7 +53,7 @@ public class SMTPResponse extends Abstra
* @param rawLine the raw SMTPResponse
*/
public SMTPResponse(String rawLine) {
- super(extractCode(rawLine), extractResponse(rawLine));
+ this(extractCode(rawLine), extractResponse(rawLine));
}
@@ -75,7 +73,7 @@ public class SMTPResponse extends Abstra
return args[2];
} else {
- throw new IllegalArgumentException("Invalid Response format.
Format should be [Code Description]");
+ return null;
}
}
/*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]